Skip to content

Commit a2e1628

Browse files
committed
Revert refactoring.
1 parent 7854ffc commit a2e1628

File tree

1 file changed

+7
-2
lines changed
  • fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/query/expressions

1 file changed

+7
-2
lines changed

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/query/expressions/Comparisons.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,18 @@ private static Comparable toComparable(@Nullable Object obj) {
215215

216216
@Nonnull
217217
public static Object toClassWithRealEquals(@Nonnull Object obj) {
218-
if (obj instanceof ByteString || obj instanceof Comparable
219-
|| obj instanceof List || obj instanceof RealVector) {
218+
if (obj instanceof ByteString) {
220219
return obj;
221220
} else if (obj instanceof byte[]) {
222221
return ByteString.copyFrom((byte[])obj);
223222
} else if (obj instanceof Internal.EnumLite) {
224223
return ((Internal.EnumLite)obj).getNumber();
224+
} else if (obj instanceof Comparable) {
225+
return obj;
226+
} else if (obj instanceof List) {
227+
return obj;
228+
} else if (obj instanceof RealVector) {
229+
return obj;
225230
} else {
226231
throw new RecordCoreException("Tried to compare non-comparable object " + obj.getClass());
227232
}

0 commit comments

Comments
 (0)