HHH-18012 Fix array type matching for auto applying AttributeConverter
This commit is contained in:
parent
9905a30852
commit
f2d086f0dc
|
@ -125,6 +125,14 @@ public class ConverterHelper {
|
||||||
if ( erasedCheckType.isPrimitive() ) {
|
if ( erasedCheckType.isPrimitive() ) {
|
||||||
erasedCheckType = PrimitiveWrapperHelper.getDescriptorByPrimitiveType( erasedCheckType ).getWrapperClass();
|
erasedCheckType = PrimitiveWrapperHelper.getDescriptorByPrimitiveType( erasedCheckType ).getWrapperClass();
|
||||||
}
|
}
|
||||||
|
else if ( erasedCheckType.isArray() ) {
|
||||||
|
// converterDefinedType have type parameters if it extends super generic class
|
||||||
|
// but checkType doesn't have any type parameters
|
||||||
|
// comparing erased type is enough
|
||||||
|
// see https://hibernate.atlassian.net/browse/HHH-18012
|
||||||
|
return converterDefinedType.getErasedType() == erasedCheckType;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !converterDefinedType.getErasedType().isAssignableFrom( erasedCheckType ) ) {
|
if ( !converterDefinedType.getErasedType().isAssignableFrom( erasedCheckType ) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue