mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-03-04 16:29:28 +00:00
This closes #3404
This commit is contained in:
commit
1adf88545f
@ -1018,7 +1018,7 @@ public abstract class AMQPMessage extends RefCountMessage implements org.apache.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return getObjectProperty(org.apache.activemq.artemis.api.core.Message.HDR_DUPLICATE_DETECTION_ID);
|
||||
return getApplicationObjectProperty(org.apache.activemq.artemis.api.core.Message.HDR_DUPLICATE_DETECTION_ID.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1382,19 +1382,25 @@ public abstract class AMQPMessage extends RefCountMessage implements org.apache.
|
||||
return AMQPMessageIdHelper.INSTANCE.toCorrelationIdString(properties.getCorrelationId());
|
||||
}
|
||||
} else {
|
||||
return getApplicationObjectProperty(key);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Object getApplicationObjectProperty(String key) {
|
||||
Object value = getApplicationPropertiesMap(false).get(key);
|
||||
if (value instanceof Number) {
|
||||
// slow path
|
||||
if (value instanceof UnsignedInteger ||
|
||||
value instanceof UnsignedByte ||
|
||||
value instanceof UnsignedLong ||
|
||||
value instanceof UnsignedShort) {
|
||||
return ((Number)value).longValue();
|
||||
} else {
|
||||
return ((Number) value).longValue();
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Short getShortProperty(String key) throws ActiveMQPropertyConversionException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user