45
45
import org .hibernate .internal .CoreLogging ;
46
46
import org .hibernate .internal .CoreMessageLogger ;
47
47
import org .hibernate .internal .util .ReflectHelper ;
48
- import org .hibernate .internal .util .collections .ArrayHelper ;
49
48
import org .hibernate .type .descriptor .converter .spi .JpaAttributeConverter ;
50
49
import org .hibernate .resource .beans .spi .ManagedBeanRegistry ;
51
50
import org .hibernate .service .ServiceRegistry ;
63
62
64
63
import jakarta .persistence .AttributeConverter ;
65
64
65
+ import static java .lang .Boolean .parseBoolean ;
66
66
import static org .hibernate .boot .model .convert .spi .ConverterDescriptor .TYPE_NAME_PREFIX ;
67
67
import static org .hibernate .id .factory .internal .IdentifierGeneratorUtil .createLegacyIdentifierGenerator ;
68
68
import static org .hibernate .internal .util .collections .ArrayHelper .toBooleanArray ;
@@ -930,7 +930,7 @@ protected void createParameterImpl() {
930
930
final XProperty xProperty = (XProperty ) typeParameters .get ( DynamicParameterizedType .XPROPERTY );
931
931
// todo : not sure this works for handling @MapKeyEnumerated
932
932
final Annotation [] annotations = xProperty == null
933
- ? null
933
+ ? new Annotation [ 0 ]
934
934
: xProperty .getAnnotations ();
935
935
936
936
final ClassLoaderService classLoaderService = getMetadata ()
@@ -941,13 +941,13 @@ protected void createParameterImpl() {
941
941
DynamicParameterizedType .PARAMETER_TYPE ,
942
942
new ParameterTypeImpl (
943
943
classLoaderService .classForTypeName (
944
- typeParameters .getProperty ( DynamicParameterizedType .RETURNED_CLASS )
944
+ typeParameters .getProperty (DynamicParameterizedType .RETURNED_CLASS )
945
945
),
946
946
annotations ,
947
947
table .getCatalog (),
948
948
table .getSchema (),
949
949
table .getName (),
950
- Boolean . parseBoolean ( typeParameters .getProperty ( DynamicParameterizedType .IS_PRIMARY_KEY ) ),
950
+ parseBoolean (typeParameters .getProperty (DynamicParameterizedType .IS_PRIMARY_KEY ) ),
951
951
columnNames ,
952
952
columnLengths
953
953
)
@@ -974,7 +974,7 @@ public DynamicParameterizedType.ParameterType makeParameterImpl() {
974
974
final XProperty xProperty = (XProperty ) typeParameters .get ( DynamicParameterizedType .XPROPERTY );
975
975
// todo : not sure this works for handling @MapKeyEnumerated
976
976
final Annotation [] annotations = xProperty == null
977
- ? null
977
+ ? new Annotation [ 0 ]
978
978
: xProperty .getAnnotations ();
979
979
980
980
final ClassLoaderService classLoaderService = getMetadata ()
@@ -983,12 +983,12 @@ public DynamicParameterizedType.ParameterType makeParameterImpl() {
983
983
.getService ( ClassLoaderService .class );
984
984
985
985
return new ParameterTypeImpl (
986
- classLoaderService .classForTypeName ( typeParameters .getProperty ( DynamicParameterizedType .RETURNED_CLASS ) ),
986
+ classLoaderService .classForTypeName (typeParameters .getProperty (DynamicParameterizedType .RETURNED_CLASS ) ),
987
987
annotations ,
988
988
table .getCatalog (),
989
989
table .getSchema (),
990
990
table .getName (),
991
- Boolean . parseBoolean ( typeParameters .getProperty ( DynamicParameterizedType .IS_PRIMARY_KEY ) ),
991
+ parseBoolean (typeParameters .getProperty (DynamicParameterizedType .IS_PRIMARY_KEY ) ),
992
992
columnNames ,
993
993
columnLengths
994
994
);
0 commit comments