mirror of
https://github.com/apache/activemq.git
synced 2025-02-06 18:18:58 +00:00
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
|
if(message.isAdvisory()&&message.getDataStructure()!=null
|
||||||
&&message.getDataStructure().getDataStructureType()==CommandTypes.CONSUMER_INFO){
|
&&message.getDataStructure().getDataStructureType()==CommandTypes.CONSUMER_INFO){
|
||||||
ConsumerInfo info=(ConsumerInfo) message.getDataStructure();
|
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(hops >= networkTTL ){
|
||||||
if (log.isTraceEnabled()){
|
if (log.isTraceEnabled()){
|
||||||
log.trace("ConsumerInfo advisory restricted to " + networkTTL + " network hops ignoring: " + message);
|
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){
|
public static boolean contains(BrokerId[] brokerPath,BrokerId brokerId){
|
||||||
if(brokerPath!=null){
|
if(brokerPath!=null && brokerId != null){
|
||||||
for(int i=0;i<brokerPath.length;i++){
|
for(int i=0;i<brokerPath.length;i++){
|
||||||
if(brokerId.equals(brokerPath[i]))
|
if(brokerId.equals(brokerPath[i]))
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user