summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/amazon/carbonado/gen/StorableGenerator.java1
-rw-r--r--src/main/java/com/amazon/carbonado/raw/CompressedEncodingStrategy.java2
-rw-r--r--src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
index ddde311..d372cf3 100644
--- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
+++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
@@ -3055,6 +3055,7 @@ public final class StorableGenerator<S extends Storable> {
b.returnValue(TypeDesc.BOOLEAN);
notEqual.setLocation();
+ // FIXME: Using instanceof means that equals is not symmetric.
// if (! target instanceof this) return false;
TypeDesc userStorableTypeDesc = TypeDesc.forClass(mStorableType);
b.loadLocal(b.getParameter(0));
diff --git a/src/main/java/com/amazon/carbonado/raw/CompressedEncodingStrategy.java b/src/main/java/com/amazon/carbonado/raw/CompressedEncodingStrategy.java
index ed68bdb..c8e913e 100644
--- a/src/main/java/com/amazon/carbonado/raw/CompressedEncodingStrategy.java
+++ b/src/main/java/com/amazon/carbonado/raw/CompressedEncodingStrategy.java
@@ -83,7 +83,7 @@ public class CompressedEncodingStrategy<S extends Storable> extends GenericEncod
if (this == obj) {
return true;
}
- if (obj instanceof CompressedEncodingStrategy) {
+ if (CompressedEncodingStrategy.class.equals(obj)) {
CompressedEncodingStrategy other = (CompressedEncodingStrategy) obj;
return super.equals(obj) && mCompressionType.equals(other.mCompressionType);
}
diff --git a/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java b/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java
index b20a521..6f3139e 100644
--- a/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java
+++ b/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java
@@ -424,7 +424,7 @@ public class GenericEncodingStrategy<S extends Storable> {
if (this == obj) {
return true;
}
- if (obj instanceof GenericEncodingStrategy) {
+ if (GenericEncodingStrategy.class.equals(obj)) {
GenericEncodingStrategy other = (GenericEncodingStrategy) obj;
return mType == other.mType
&& mKeyPrefixPadding == other.mKeyPrefixPadding