brusdev commented on a change in pull request #3408:
URL: https://github.com/apache/activemq-artemis/pull/3408#discussion_r559574955
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/HierarchicalObjectRepository.java
##########
@@ -488,12 +488,11 @@ public int compare(final String o1, final String o2) {
String[] rightSplits = o2.split(quotedDelimiter);
for (int i = 0; i < leftSplits.length; i++) {
String left = leftSplits[i];
- if (left.equals(singleWord)) {
- if (rightSplits.length < i ||
!rightSplits[i].equals(singleWord)) {
- return -1;
- } else {
- return +1;
- }
+ String right = rightSplits[i];
Review comment:
Now, the behavior LGTM but the `leftSplits.length` could be greater than
`rightSplits.length` causing an ArrayIndexOutOfBoundsException, ie
o1=`foo.*.too` and o2=`foo.*`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]