mirror of https://github.com/apache/activemq.git
fixed NPE
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@382888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4759540e6e
commit
dc168c055b
|
@ -50,6 +50,7 @@ public class ActiveMQMessage extends Message implements javax.jms.Message {
|
||||||
}
|
}
|
||||||
|
|
||||||
transient protected Callback acknowledgeCallback;
|
transient protected Callback acknowledgeCallback;
|
||||||
|
transient int hashCode;
|
||||||
|
|
||||||
public Message copy() {
|
public Message copy() {
|
||||||
ActiveMQMessage copy = new ActiveMQMessage();
|
ActiveMQMessage copy = new ActiveMQMessage();
|
||||||
|
@ -64,7 +65,13 @@ public class ActiveMQMessage extends Message implements javax.jms.Message {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return this.getMessageId().hashCode();
|
MessageId id = getMessageId();
|
||||||
|
if (id != null) {
|
||||||
|
return id.hashCode();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return super.hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
|
Loading…
Reference in New Issue