mabrarov commented on a change in pull request #32:
URL: https://github.com/apache/maven-ear-plugin/pull/32#discussion_r548865908



##########
File path: 
src/test/java/org/apache/maven/plugins/ear/util/ArtifactRepositoryTest.java
##########
@@ -34,14 +36,15 @@
     extends AbstractEarTestBase
 {
 
-    public static final String MAIN_ARTIFACT_ID = "none";
+    private static final String MAIN_ARTIFACT_ID = "none";
+
+    private ArtifactTypeMappingService artifactTypeMappingService = new 
ArtifactTypeMappingService();
 
     @Test
     public void testEmptyRepository()
     {
-        ArtifactTypeMappingService artifactTypeMappingService = new 
ArtifactTypeMappingService();
-        ArtifactRepository repo =
-            new ArtifactRepository( createArtifacts( null ), MAIN_ARTIFACT_ID, 
artifactTypeMappingService );
+        Set<Artifact> artifacts = new HashSet<>();

Review comment:
       Do we really need `artifacts` local variable and isn't 
`Collections#emptySet` be more readable? Like:
   
   ```java
           ArtifactRepository repo =
               new ArtifactRepository( Collections.<Artifact>emptySet(), 
MAIN_ARTIFACT_ID, artifactTypeMappingService );
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to