mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-03-09 02:39:28 +00:00
ARTEMIS-4962 mitigate NPE in FilterImpl
This commit is contained in:
parent
57adcd3286
commit
d929c5dd66
@ -163,14 +163,17 @@ public class FilterImpl implements Filter {
|
||||
String amqpNativeID = msg.getStringProperty(NATIVE_MESSAGE_ID);
|
||||
if (amqpNativeID != null) {
|
||||
return SimpleString.of(amqpNativeID);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// 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:")) {
|
||||
return SimpleString.of(userID);
|
||||
} else {
|
||||
return SimpleString.of("ID:" + msg.getUserID());
|
||||
// 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:")) {
|
||||
return SimpleString.of(userID);
|
||||
} else {
|
||||
return SimpleString.of("ID:" + msg.getUserID());
|
||||
}
|
||||
}
|
||||
} else if (FilterConstants.ACTIVEMQ_PRIORITY.equals(fieldName)) {
|
||||
return (int) msg.getPriority();
|
||||
|
Loading…
x
Reference in New Issue
Block a user