Skip to content

Commit 4b47b1e

Browse files
committed
Fixes comparison to use equality instead of reference.
TypeInformation.OBJECT must not be compared by reference since TypeInformation instances come form a LRU cache and if TypeInformation.OBJECT gets evicted future instances might be equal, but won't have the same reference. Closes #2083
1 parent 196e2c8 commit 4b47b1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/MappingRelationalConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ public Object writeValue(@Nullable Object value, TypeInformation<?> type) {
693693
return getConversionService().convert(value, customWriteTarget.get());
694694
}
695695

696-
if (TypeInformation.OBJECT != type) {
696+
if (!TypeInformation.OBJECT.equals(type)) {
697697

698698
if (type.getType().isAssignableFrom(value.getClass())) {
699699

0 commit comments

Comments
 (0)