Tibor17 commented on a change in pull request #449:
URL: https://github.com/apache/maven-surefire/pull/449#discussion_r793085774



##########
File path: 
maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ProviderDetector.java
##########
@@ -48,33 +51,35 @@
     @Nonnull
     public List<ProviderInfo> resolve( ConfigurableProviderInfo 
dynamicProvider, ProviderInfo... wellKnownProviders )
     {
-        List<ProviderInfo> providersToRun = new ArrayList<>();
         Set<String> manuallyConfiguredProviders = 
getManuallyConfiguredProviders();
-        for ( String name : manuallyConfiguredProviders )
+
+        List<ProviderInfo> providersToRun = 
manuallyConfiguredProviders.stream()
+            .map( name -> findByName( name, dynamicProvider, 
wellKnownProviders ) )
+            .collect( Collectors.toList() );

Review comment:
       You can use `import static` which makes the code more compact.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to