[maven-rar-plugin] branch java7 created (now ac9c7e1)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven-rar-plugin] branch java7 created (now ac9c7e1)

slachiewicz
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch java7
in repository https://gitbox.apache.org/repos/asf/maven-rar-plugin.git.


      at ac9c7e1  Cleanup - Java 7 - replace with diamond

This branch includes the following new commits:

     new ac9c7e1  Cleanup - Java 7 - replace with diamond

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Reply | Threaded
Open this post in threaded view
|

[maven-rar-plugin] 01/01: Cleanup - Java 7 - replace with diamond

slachiewicz
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch java7
in repository https://gitbox.apache.org/repos/asf/maven-rar-plugin.git

commit ac9c7e11ab9d37c60d103d2379005c93ddcbdce2
Author: Sylwester Lachiewicz <[hidden email]>
AuthorDate: Thu Jun 4 14:24:05 2020 +0200

    Cleanup - Java 7 - replace with diamond
---
 src/main/java/org/apache/maven/plugins/rar/RarMojo.java  |  2 +-
 .../java/org/apache/maven/plugins/rar/RarMojoTest.java   | 16 ++++++++--------
 .../maven/plugins/rar/stubs/RarMavenProjectStub.java     |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/rar/RarMojo.java b/src/main/java/org/apache/maven/plugins/rar/RarMojo.java
index 45120b9..6311ab6 100644
--- a/src/main/java/org/apache/maven/plugins/rar/RarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/rar/RarMojo.java
@@ -414,7 +414,7 @@ public class RarMojo
         resource.setTargetPath( getBuildDir().getAbsolutePath() );
         resource.setFiltering( filterRarSourceDirectory );
 
-        List<Resource> resources = new ArrayList<Resource>();
+        List<Resource> resources = new ArrayList<>();
         resources.add( resource );
 
         if ( rarResources != null && !rarResources.isEmpty() )
diff --git a/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java b/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java
index 838c34c..10a3c26 100644
--- a/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java
@@ -83,7 +83,7 @@ public class RarMojoTest
         File[] fileNames = workDirectory.listFiles();
         assertNotNull( fileNames );
 
-        List<String> expectedFiles = new ArrayList<String>();
+        List<String> expectedFiles = new ArrayList<>();
 
         expectedFiles.add( "maven-artifact01-1.0-SNAPSHOT.jar" );
         expectedFiles.add( "maven-artifact02-1.0-SNAPSHOT.jar" );
@@ -116,7 +116,7 @@ public class RarMojoTest
         assertTrue( rarFile.exists() );
 
         //expected files/directories inside the rar file
-        expectedFiles = new ArrayList<String>();
+        expectedFiles = new ArrayList<>();
 
         expectedFiles.add( "META-INF/maven/org.apache.maven.test/maven-rar-test/pom.properties" );
         expectedFiles.add( "META-INF/maven/org.apache.maven.test/maven-rar-test/pom.xml" );
@@ -168,8 +168,8 @@ public class RarMojoTest
         File[] fileNames = workDirectory.listFiles();
         assertNotNull( fileNames );
 
-        List<String> expectedFiles = new ArrayList<String>();
-        List<String> fileList = new ArrayList<String>();
+        List<String> expectedFiles = new ArrayList<>();
+        List<String> fileList = new ArrayList<>();
 
         for ( File fileName : fileNames )
         {
@@ -191,7 +191,7 @@ public class RarMojoTest
         assertTrue( rarFile.exists() );
 
         //expected files/directories inside the rar file
-        expectedFiles = new ArrayList<String>();
+        expectedFiles = new ArrayList<>();
 
         expectedFiles.add( "META-INF/maven/org.apache.maven.test/maven-rar-test/pom.properties" );
         expectedFiles.add( "META-INF/maven/org.apache.maven.test/maven-rar-test/pom.xml" );
@@ -243,8 +243,8 @@ public class RarMojoTest
         File[] fileNames = workDirectory.listFiles();
         assertNotNull( fileNames );
 
-        List<String> expectedFiles = new ArrayList<String>();
-        List<String> fileList = new ArrayList<String>();
+        List<String> expectedFiles = new ArrayList<>();
+        List<String> fileList = new ArrayList<>();
 
         for ( File file : fileNames )
         {
@@ -267,7 +267,7 @@ public class RarMojoTest
         assertTrue( rarFile.exists() );
 
         //expected files/directories inside the rar file
-        expectedFiles = new ArrayList<String>();
+        expectedFiles = new ArrayList<>();
 
         expectedFiles.add( "META-INF/maven/org.apache.maven.test/maven-rar-test/pom.properties" );
         expectedFiles.add( "META-INF/maven/org.apache.maven.test/maven-rar-test/pom.xml" );
diff --git a/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java b/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java
index 427d403..b3c512e 100644
--- a/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java
+++ b/src/test/java/org/apache/maven/plugins/rar/stubs/RarMavenProjectStub.java
@@ -122,7 +122,7 @@ public class RarMavenProjectStub
 
     public Set<Artifact> getArtifacts()
     {
-        Set<Artifact> artifacts = new HashSet<Artifact>();
+        Set<Artifact> artifacts = new HashSet<>();
 
         artifacts.add( createArtifact( "org.apache.maven.test", "maven-artifact01", "1.0-SNAPSHOT", false ) );
         artifacts.add( createArtifact( "org.apache.maven.test", "maven-artifact02", "1.0-SNAPSHOT", false ) );
@@ -134,7 +134,7 @@ public class RarMavenProjectStub
     {
         if ( attachedArtifacts == null )
         {
-            attachedArtifacts = new ArrayList<Artifact>();
+            attachedArtifacts = new ArrayList<>();
         }
         return attachedArtifacts;
     }