brusdev commented on code in PR #6029:
URL: https://github.com/apache/activemq-artemis/pull/6029#discussion_r2510657017


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AddressInfo.java:
##########
@@ -102,6 +102,17 @@ public void setSwept(boolean swept) {
    private AddressInfo() {
    }
 
+   /**
+    * Constructs a new {@code AddressInfo} object by copying the name and 
routing types
+    * from another {@code AddressInfo} instance.
+    *
+    * @param other the {@code AddressInfo} instance to copy from. The name and 
routing types
+    *              from this instance will be used to initialize the new 
{@code AddressInfo}.
+    */
+   public AddressInfo(AddressInfo other) {
+      this(other.getName(), EnumSet.copyOf(other.getRoutingTypes()));
+   }

Review Comment:
   A partial copy constructor could cause confusion. Why not reuse the existing 
constructor `AddressInfo(SimpleString name, EnumSet<RoutingType> routingTypes) 
` ?



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