Tibor17 commented on a change in pull request #196: [SUREFIRE-1585] [WIP] Resolve missing artifact URL: https://github.com/apache/maven-surefire/pull/196#discussion_r228219234
########## File path: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java ########## @@ -2995,6 +2996,36 @@ private void resolveJUnitVintageEngine( Set<Artifact> providerArtifacts ) Set<Artifact> resolvedArtifacts = resolveArtifact( null, junitVintageEngine ).getArtifacts(); providerArtifacts.addAll( resolvedArtifacts ); } + + private void alignJUnitPlatformLauncher( Set<Artifact> providerArtifacts ) + { + Map<String, Artifact> providerArtifactMap = new HashMap<String, Artifact>(); + for ( Artifact artifact : providerArtifacts ) + { + String key = artifact.getGroupId() + ":" + artifact.getArtifactId(); + providerArtifactMap.put( key, artifact ); + } + Artifact defaultLauncher = providerArtifactMap.get( "org.junit.platform:junit-platform-launcher" ); + Artifact junitPlatformCommons = getProjectArtifactMap().get( "org.junit.platform:junit-platform-commons" ); + + if ( junitPlatformCommons.getVersion().equals( defaultLauncher.getVersion() ) ) + { + return; Review comment: Why not negation and then pass the code into IF body. Why return. The `new DefaultArtifact(` is afterwards. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services