Tibor17 commented on a change in pull request #393: URL: https://github.com/apache/maven-surefire/pull/393#discussion_r746920580
########## File path: maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ProviderDetector.java ########## @@ -0,0 +1,104 @@ +package org.apache.maven.surefire.providerapi; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import javax.annotation.Nonnull; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.apache.maven.surefire.api.provider.SurefireProvider; +import org.codehaus.plexus.component.annotations.Component; +import org.codehaus.plexus.component.annotations.Requirement; +import org.codehaus.plexus.logging.Logger; + +import static java.lang.Thread.currentThread; + +/** + * @author Kristian Rosenvold + */ +@Component( role = ProviderDetector.class ) +public final class ProviderDetector Review comment: Nicely extracted class. I want to ask about the modifiers `public`. Are they important? ########## File path: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java ########## @@ -1197,13 +1200,12 @@ private void executeAfterPreconditionsChecked( @Nonnull DefaultScanResult scanRe throws MojoExecutionException { Artifact junitDepArtifact = getJunitDepArtifact(); - return new ProviderList( new DynamicProviderInfo( null ), - new JUnitPlatformProviderInfo( getJUnit5Artifact(), testClasspath ), - new TestNgProviderInfo( getTestNgArtifact() ), - new JUnitCoreProviderInfo( getJunitArtifact(), junitDepArtifact ), - new JUnit4ProviderInfo( getJunitArtifact(), junitDepArtifact ), - new JUnit3ProviderInfo() ) - .resolve(); + return providerDetector.resolve( new DynamicProviderInfo( null ), Review comment: Why this line has changed? Previously the line was `return new ProviderList( new DynamicProviderInfo( null ),`. ########## File path: maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ConfigurableProviderInfo.java ########## @@ -22,7 +22,7 @@ /** * @author Kristian Rosenvold */ -interface ConfigurableProviderInfo +public interface ConfigurableProviderInfo Review comment: @slawekjaranowski This interface is only used ASM class or you think that other project which extends the ASM class can instantiate it in the subclass of ASM class? -- 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]
