### Eclipse Workspace Patch 1.0 #P infinispan-core Index: src/main/java/org/infinispan/marshall/MarshalledValue.java =================================================================== --- src/main/java/org/infinispan/marshall/MarshalledValue.java (revision 2346) +++ src/main/java/org/infinispan/marshall/MarshalledValue.java (working copy) @@ -54,7 +54,7 @@ volatile protected byte[] raw; volatile private int cachedHashCode = 0; // by default equals() will test on the instance rather than the byte array if conversion is required. - private transient boolean equalityPreferenceForInstance = true; + private transient boolean equalityPreferenceForInstance = false; private final StreamingMarshaller marshaller; public MarshalledValue(Object instance, boolean equalityPreferenceForInstance, StreamingMarshaller marshaller) throws NotSerializableException { @@ -180,7 +180,7 @@ if (instance != null && that.instance != null) return instance.equals(that.instance); // if conversion of one representation to the other is necessary, then see which we prefer converting. - if (equalityPreferenceForInstance) { + if (equalityPreferenceForInstance && that.equalityPreferenceForInstance) { if (instance == null) deserialize(); if (that.instance == null) that.deserialize(); return instance.equals(that.instance);