You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/05/20 17:18:35 UTC

[GitHub] [maven] elharo commented on a change in pull request #346: [MNG-6909] Use CDI to inject objects under tests

elharo commented on a change in pull request #346:
URL: https://github.com/apache/maven/pull/346#discussion_r428178523



##########
File path: maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
##########
@@ -53,12 +57,24 @@
 
     private static String BASE_MIXIN_DIR = BASE_DIR + "/resources-mixins";
 
+    @Inject
     private DefaultProjectBuilder projectBuilder;
 
+    @Inject
     private RepositorySystem repositorySystem;
 
     private File testDirectory;
 
+    @Override
+    protected synchronized void setupContainer()
+    {
+        super.setupContainer();
+
+        ((DefaultPlexusContainer)getContainer())

Review comment:
       This requires Java 8, and would probably be clearer without lambdas




----------------------------------------------------------------
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:
users@infra.apache.org