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 2018/11/10 21:12:58 UTC

[GitHub] Tibor17 commented on a change in pull request #199: Surefire 1593

Tibor17 commented on a change in pull request #199: Surefire 1593
URL: https://github.com/apache/maven-surefire/pull/199#discussion_r232466133
 
 

 ##########
 File path: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
 ##########
 @@ -116,10 +116,10 @@ private File createJar( @Nonnull List<String> classPath, @Nonnull String startCl
             StringBuilder cp = new StringBuilder();
             for ( Iterator<String> it = classPath.iterator(); it.hasNext(); )
             {
-                File classPathElement = new File( it.next() );
+                String classPathElement = it.next();
                 String uri = toClasspathElementUri( parent, classPathElement, dumpLogDirectory );
                 cp.append( uri );
-                if ( classPathElement.isDirectory() && !uri.endsWith( "/" ) )
+                if ( new File( classPathElement ).isDirectory() && !uri.endsWith( "/" ) )
 
 Review comment:
   @eolivelli 
   yes, and moreover we should change the method signature from this:
   `toClasspathElementUri( String parent, String classPathElement, File dumpLogDirectory )`
   to this:
   `toClasspathElementUri( Path parent, Path classPathElement, Path dumpLogDirectory )`
   Which requires calling `dumpLogDir.toPath()` in `ForkStarter` (Line 580) but pls do not go deeper changing File to Path in all project since it is not a matter of this PR.

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


With regards,
Apache Git Services