updated hashCode and equals to pickup new fields.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@383545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-06 14:10:43 +00:00
parent b665f18730
commit c3e10f5438
1 changed files with 7 additions and 3 deletions

View File

@ -72,7 +72,9 @@ final public class OpenWireFormat implements WireFormat {
return version return version
^ (cacheEnabled ? 0x10000000:0x20000000) ^ (cacheEnabled ? 0x10000000:0x20000000)
^ (stackTraceEnabled ? 0x01000000:0x02000000) ^ (stackTraceEnabled ? 0x01000000:0x02000000)
^ (tightEncodingEnabled ? 0x00100000:0x00200000); ^ (tightEncodingEnabled ? 0x00100000:0x00200000)
^ (prefixPacketSize ? 0x00010000:0x00020000)
;
} }
public boolean equals(Object object) { public boolean equals(Object object) {
@ -82,11 +84,13 @@ final public class OpenWireFormat implements WireFormat {
return o.stackTraceEnabled == stackTraceEnabled && return o.stackTraceEnabled == stackTraceEnabled &&
o.cacheEnabled == cacheEnabled && o.cacheEnabled == cacheEnabled &&
o.version == version && o.version == version &&
o.tightEncodingEnabled == tightEncodingEnabled; o.tightEncodingEnabled == tightEncodingEnabled &&
o.prefixPacketSize == prefixPacketSize
;
} }
public String toString() { public String toString() {
return "OpenWireFormat{version="+version+", cacheEnabled="+cacheEnabled+", stackTraceEnabled="+stackTraceEnabled+"}"; return "OpenWireFormat{version="+version+", cacheEnabled="+cacheEnabled+", stackTraceEnabled="+stackTraceEnabled+", tightEncodingEnabled="+tightEncodingEnabled+", prefixPacketSize="+prefixPacketSize+"}";
} }
public int getVersion() { public int getVersion() {