You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/12/01 15:25:42 UTC

[GitHub] [activemq-artemis] rtista commented on a change in pull request #3365: ARTEMIS-1883 Improve FQQN validation

rtista commented on a change in pull request #3365:
URL: https://github.com/apache/activemq-artemis/pull/3365#discussion_r533499286



##########
File path: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/CompositeAddress.java
##########
@@ -41,12 +44,25 @@ public static SimpleString toFullyQualified(SimpleString address, SimpleString q
       return result;
    }
 
+   /**
+    * Checks whether a given string complies the fully qualified queue name (FQQN) standard or not.
+    *
+    * @param address The string to check for FQQN standard compliance.
+    * @return boolean
+    */
    public static boolean isFullyQualified(String address) {
-      return address == null ? false : address.contains(SEPARATOR);
+      List<String> split = Splitter.onPattern(SEPARATOR).splitToList(address);

Review comment:
       Hey Justin, thanks a lot for the suggestion, I had also encountered a similar piece of code in the same class which was using indexOf and was thinking of changing into it.
   
   I re-ran the tests and the performance improvement is really noticeable so thank you again!
   
   I am now following up on the test failures albeit from what I can see the one I was previously following up, related to the AMQP protocol (ProtonServerSendContext.java class), seems to have been fixed by these changes!




----------------------------------------------------------------
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:
users@infra.apache.org