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 2022/12/15 21:30:57 UTC

[GitHub] [activemq-artemis] AntonRoskvist commented on a diff in pull request #4288: ARTEMIS-4091 - Make scaleDown target more deterministic

AntonRoskvist commented on code in PR #4288:
URL: https://github.com/apache/activemq-artemis/pull/4288#discussion_r1050155796


##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java:
##########
@@ -436,7 +437,9 @@ public boolean isSameTarget(TransportConfiguration... configs) {
             continue;
          }
          if (NettyConnectorFactory.class.getName().equals(cfg.getFactoryClassName())) {
-            if (configuration.get(TransportConstants.PORT_PROP_NAME).equals(cfg.getParams().get(TransportConstants.PORT_PROP_NAME))) {
+            int port1 = ConfigurationHelper.getIntProperty(TransportConstants.PORT_PROP_NAME, TransportConstants.DEFAULT_PORT, configuration);
+            int port2 = ConfigurationHelper.getIntProperty(TransportConstants.PORT_PROP_NAME, TransportConstants.DEFAULT_PORT, cfg.getParams());
+            if (port1 == port2) {

Review Comment:
   Probably not... it comes from the test actually. The way the cluster nodes are set up in ClusterTestBase means that PORT_PROP_NAME will be an int, while a connector read from the config file or one added from management operation would be expressed as a String. I think it was in that order... but regardless, I added this because I though it might be something worth covering for.



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

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org