rtista commented on a change in pull request #3365:
URL: https://github.com/apache/activemq-artemis/pull/3365#discussion_r536727461
##########
File path:
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/CompositeAddress.java
##########
@@ -41,12 +41,36 @@ 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);
+ if (address == null) {
+ return false;
+ }
+
+ // If address length is incapable of holding the separator and two more
characters
+ if (address.length() < SEPARATOR.length() + 2) {
Review comment:
I implemented this, creating a new class constant which I even reuse in
the return statement thus making the function idempotent to changes to the
SEPARATOR I believe! ;)
----------------------------------------------------------------
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]