msingermann commented on a change in pull request #3408:
URL: https://github.com/apache/activemq-artemis/pull/3408#discussion_r559605184



##########
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:
       i tried to reproduce the case but i guess the `getPossibleMatches` 
method ensures that the matches has the same length if it falls on the last if 
(both singleWord).
   anyways i added an extra if to return in case the 2nd is shorter.




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


Reply via email to