You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "mattrpav (via GitHub)" <gi...@apache.org> on 2024/09/10 15:29:14 UTC

Re: [PR] [AMQ-9530]Fix SelectorAwareVirtualTopicInterceptor ClassCastException if next is not Topic. [activemq]

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

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


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