jbertram commented on code in PR #6121:
URL: https://github.com/apache/artemis/pull/6121#discussion_r2611410351
##########
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:
The current code doesn't take any special action for this case which means
an address like `a\\.b` will _not_ be split into `a\\` & `b` as one might
expect.
--
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]