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/02/19 14:44:24 UTC

[GitHub] [activemq] coheigea commented on a change in pull request #465: Fix issue where the registry lookup was a hardcoded name and didn't a…

coheigea commented on a change in pull request #465: Fix issue where the registry lookup was a hardcoded name and didn't a…
URL: https://github.com/apache/activemq/pull/465#discussion_r381335763
 
 

 ##########
 File path: activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
 ##########
 @@ -690,10 +690,17 @@ public JmxRegistry(int port) throws RemoteException {
             super(port);
         }
 
-        @Override
+        private String getLookupName() {
+            if (getConnectorPath() == null || getConnectorPath().length() == 0) {
+                return LOOKUP_NAME;
+            }
 
+            return getConnectorPath().replaceAll("^/+", "").replaceAll("/+$", "");
 
 Review comment:
   As getConnectorPath doesn't change, I guess it would make sense to only perform these regex's once (on setConnectorPath?)

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


With regards,
Apache Git Services