eolivelli commented on a change in pull request #3: [MWAR-371] Overlays break 
first-win rule for web resource with target path ending with '/'
URL: https://github.com/apache/maven-war-plugin/pull/3#discussion_r244158490
 
 

 ##########
 File path: src/main/java/org/apache/maven/plugins/war/util/PathSet.java
 ##########
 @@ -53,14 +52,14 @@ static String normalizeSubPath( String path )
         {
             return path;
         }
-        String cleanPath = path.replaceAll( "[\\\\]+", SEPARATOR )
-                .replaceAll( "[/]+" , SEPARATOR );
-        cleanPath = cleanPath.charAt( 0 ) == '/' ? cleanPath.substring( 1 ) : 
cleanPath;
+        String cleanPath = path.replaceAll( "[\\\\]+", File.separator )
+                .replaceAll( "[/]+" , File.separator );
+        cleanPath = cleanPath.charAt( 0 ) == File.separatorChar ? 
cleanPath.substring( 1 ) : cleanPath;
         if ( cleanPath.isEmpty() )
         {
             return cleanPath;
         }
-        if ( cleanPath.charAt( cleanPath.length() - 1 ) == '/' )
+        if ( cleanPath.charAt( cleanPath.length() - 1 ) == File.separatorChar )
 
 Review comment:
   Don't worry.
   We will test your commit over all supported versions of Maven, Java and 
Linux and Windows.
   Hopefully if you are breaking things we will notice

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to