activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r560694 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
Date Sun, 29 Jul 2007 08:56:22 GMT
Author: rajdavies
Date: Sun Jul 29 01:56:21 2007
New Revision: 560694

URL: http://svn.apache.org/viewvc?view=rev&rev=560694
Log:
check for nulls

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java?view=diff&rev=560694&r1=560693&r2=560694
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
Sun Jul 29 01:56:21 2007
@@ -94,7 +94,7 @@
         if(message.isAdvisory()&&message.getDataStructure()!=null
                         &&message.getDataStructure().getDataStructureType()==CommandTypes.CONSUMER_INFO){
             ConsumerInfo info=(ConsumerInfo) message.getDataStructure();
-            hops = info.getBrokerPath() == null ? 0 : message.getBrokerPath().length;
+            hops = info.getBrokerPath() == null ? 0 : info.getBrokerPath().length;
             if(hops >= networkTTL ){
                 if (log.isTraceEnabled()){
                     log.trace("ConsumerInfo advisory restricted to " + networkTTL + " network
hops ignoring: " + message);
@@ -106,7 +106,7 @@
     }
     
     public static boolean contains(BrokerId[] brokerPath,BrokerId brokerId){
-        if(brokerPath!=null){
+        if(brokerPath!=null && brokerId != null){
             for(int i=0;i<brokerPath.length;i++){
                 if(brokerId.equals(brokerPath[i]))
                     return true;



Mime
View raw message