kwin commented on code in PR #760:
URL: 
https://github.com/apache/maven-shade-plugin/pull/760#discussion_r2902263946


##########
src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java:
##########
@@ -34,7 +34,7 @@ public class SimpleRelocator implements Relocator {
     /**
      * Match dot, slash or space at end of string
      */
-    private static final Pattern RX_ENDS_WITH_DOT_SLASH_SPACE = 
Pattern.compile("[./ ]$");
+    private static final Pattern RX_ENDS_WITH_DOT_SLASH_SPACE = 
Pattern.compile("(\\.|/|[^<?:+\\-*/^|&] )$");

Review Comment:
   Also a comment would be much appreciated why those characters are not 
allowed...



##########
src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java:
##########
@@ -34,7 +34,7 @@ public class SimpleRelocator implements Relocator {
     /**
      * Match dot, slash or space at end of string
      */
-    private static final Pattern RX_ENDS_WITH_DOT_SLASH_SPACE = 
Pattern.compile("[./ ]$");
+    private static final Pattern RX_ENDS_WITH_DOT_SLASH_SPACE = 
Pattern.compile("(\\.|/|[^<?:+\\-*/^|&] )$");

Review Comment:
   Why are three conditions necessary when the first and the second can never 
be true without the last one? Isn't the last one sufficient then? This also 
requires some renaming of this constant.



-- 
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]

Reply via email to