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


##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/BaseVirtualDestinationFilter.java:
##########
@@ -0,0 +1,23 @@
+package org.apache.activemq.broker.region.virtual;
+
+import org.apache.activemq.broker.region.BaseDestination;
+import org.apache.activemq.broker.region.Destination;
+import org.apache.activemq.broker.region.DestinationFilter;
+
+import java.util.Optional;
+
+public class BaseVirtualDestinationFilter extends DestinationFilter {
+    
+    public BaseVirtualDestinationFilter(Destination next) {
+        super(next);
+    }
+
+    Optional<BaseDestination> getBaseDestination(Destination virtualDest) {

Review Comment:
   I'm not sure we want to introduce Optional here to just eventually use it in 
a stream that calls findFirst. This method gets called a _lot_ and using 
Optional will create an extra object that needs to be gc'd.
   
   @cshannon @jbonofre thoughts?



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