[
https://issues.apache.org/jira/browse/ARTEMIS-5809?focusedWorklogId=995857&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-995857
]
ASF GitHub Bot logged work on ARTEMIS-5809:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 11/Dec/25 17:16
Start Date: 11/Dec/25 17:16
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 995857)
Time Spent: 50m (was: 40m)
> Account for escaped delimiters when parsing address paths
> ---------------------------------------------------------
>
> Key: ARTEMIS-5809
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5809
> Project: Artemis
> Issue Type: Bug
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.45.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]