ARTEMIS-4962 mitigate NPE in FilterImpl
This commit is contained in:
parent
57adcd3286
commit
d929c5dd66
|
@ -163,8 +163,10 @@ public class FilterImpl implements Filter {
|
|||
String amqpNativeID = msg.getStringProperty(NATIVE_MESSAGE_ID);
|
||||
if (amqpNativeID != null) {
|
||||
return SimpleString.of(amqpNativeID);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// It's the stringified (hex) representation of a user id that can be used in a selector expression
|
||||
String userID = msg.getUserID().toString();
|
||||
if (userID.startsWith("ID:")) {
|
||||
|
@ -172,6 +174,7 @@ public class FilterImpl implements Filter {
|
|||
} else {
|
||||
return SimpleString.of("ID:" + msg.getUserID());
|
||||
}
|
||||
}
|
||||
} else if (FilterConstants.ACTIVEMQ_PRIORITY.equals(fieldName)) {
|
||||
return (int) msg.getPriority();
|
||||
} else if (FilterConstants.ACTIVEMQ_TIMESTAMP.equals(fieldName)) {
|
||||
|
|
Loading…
Reference in New Issue