Tibor17 commented on a change in pull request #449:
URL: https://github.com/apache/maven-surefire/pull/449#discussion_r793157137
##########
File path:
maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ProviderDetector.java
##########
@@ -48,33 +52,36 @@
@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, wellKnownProviders )
+ .orElseGet( () -> dynamicProvider.instantiate( name ) ) )
Review comment:
aha, it is a nested call, now I see. I can better read the second
option. Thx
--
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]