mattrpav commented on code in PR #2606:
URL: https://github.com/apache/activemq/pull/2606#discussion_r4602986946


##########
activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java:
##########
@@ -463,6 +465,12 @@ public void setClientID(String newClientID) throws 
JMSException {
             throw new IllegalStateException("The clientID has already been 
set");
         }
 
+        // The specification forbids overriding an administratively configured 
client
+        // identifier; ActiveMQ has always allowed it, so enforce under strict 
compliance.
+        if (this.adminConfiguredClientID && this.strictCompliance) {

Review Comment:
   The strictCompliance flag is for that scenario. The behavior to correct is 
application code that call setClientID in the first place, I don't think having 
a conditional there is a good practice as it does not reinforce the 
specification behavior when strictCompliance=true.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to