brusdev commented on code in PR #6121:
URL: https://github.com/apache/artemis/pull/6121#discussion_r2609382675


##########
artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java:
##########
@@ -372,8 +372,10 @@ public String[] getPaths(final char separator) {
       }
       List<String> pathsList = new ArrayList<>();
       StringBuilder pathAccumulator = new StringBuilder();
-      for (char c : toString().toCharArray()) {
-         if (c == separator) {
+      char[] chars = toString().toCharArray();
+      for (int i = 0; i < chars.length; i++) {
+         char c = chars[i];
+         if (c == separator && (i == 0 || chars[i - 1] != '\\')) {

Review Comment:
   What is the expected behavior when chars[i - 1] == '\\' and chars[i - 2] == 
'\\'?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to