Skip to content

Commit 4c42ff2

Browse files
committed
HHH-19964 Fixup type check in AbstractJsonFormatMapper#toString
1 parent 2d35efa commit 4c42ff2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/type/format/AbstractJsonFormatMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public final <T> T fromString(CharSequence charSequence, JavaType<T> javaType, W
2727
@Override
2828
public final <T> String toString(T value, JavaType<T> javaType, WrapperOptions wrapperOptions) {
2929
final Type type = javaType.getJavaType();
30-
if ( value instanceof String ) {
30+
if ( type == String.class ) {
3131
return (String) value;
3232
}
3333
return toString( value, type );

0 commit comments

Comments
 (0)