activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1383856 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Date Wed, 12 Sep 2012 08:58:19 GMT
Author: davsclaus
Date: Wed Sep 12 08:58:18 2012
New Revision: 1383856

URL: http://svn.apache.org/viewvc?rev=1383856&view=rev
Log:
AMQ-4045: Fixed NPE in BrokerService.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=1383856&r1=1383855&r2=1383856&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Wed Sep 12 08:58:18 2012
@@ -2515,12 +2515,14 @@ public class BrokerService implements Se
         // created at startup, so no sync needed
         if (virtualConsumerDestinationFilter == null) {
             Set <ActiveMQQueue> consumerDestinations = new HashSet<ActiveMQQueue>();
-            for (DestinationInterceptor interceptor : destinationInterceptors) {
-                if (interceptor instanceof VirtualDestinationInterceptor) {
-                    VirtualDestinationInterceptor virtualDestinationInterceptor = (VirtualDestinationInterceptor)
interceptor;
-                    for (VirtualDestination virtualDestination: virtualDestinationInterceptor.getVirtualDestinations())
{
-                        if (virtualDestination instanceof VirtualTopic) {
-                            consumerDestinations.add(new ActiveMQQueue(((VirtualTopic) virtualDestination).getPrefix()
+ DestinationFilter.ANY_DESCENDENT));
+            if (destinationInterceptors != null) {
+                for (DestinationInterceptor interceptor : destinationInterceptors) {
+                    if (interceptor instanceof VirtualDestinationInterceptor) {
+                        VirtualDestinationInterceptor virtualDestinationInterceptor = (VirtualDestinationInterceptor)
interceptor;
+                        for (VirtualDestination virtualDestination: virtualDestinationInterceptor.getVirtualDestinations())
{
+                            if (virtualDestination instanceof VirtualTopic) {
+                                consumerDestinations.add(new ActiveMQQueue(((VirtualTopic)
virtualDestination).getPrefix() + DestinationFilter.ANY_DESCENDENT));
+                            }
                         }
                     }
                 }



Mime
View raw message