mirror of https://github.com/apache/activemq.git
check for nulls
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@560694 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1e3e5b7223
commit
14180c5cb3
|
@ -94,7 +94,7 @@ public class NetworkBridgeFilter implements DataStructure, BooleanExpression {
|
|||
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 class NetworkBridgeFilter implements DataStructure, BooleanExpression {
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue