gemmellr commented on code in PR #5854:
URL: https://github.com/apache/activemq-artemis/pull/5854#discussion_r2254459932


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java:
##########
@@ -140,7 +159,12 @@ public RemotingServiceImpl(final ClusterManager 
clusterManager,
                               final ServiceRegistry serviceRegistry) {
       this.serviceRegistry = serviceRegistry;
 
-      acceptorsConfig = config.getAcceptorConfigurations();
+      if (config.getAcceptorConfigurations() != null && 
!config.getAcceptorConfigurations().isEmpty()) {
+         acceptorsConfig = config.getAcceptorConfigurations().stream()
+                                                             
.collect(Collectors.toMap(c -> c.getName(), Function.identity()));
+      } else {
+         acceptorsConfig = Collections.emptyMap();

Review Comment:
   Good catch. I guess that was the point initially, but you are correct that 
if none were present initially, but then some were attempted to be added, it 
would try to do a putAll on this map.



-- 
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-unsubscr...@activemq.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to