Skip to content

Commit c8b0db9

Browse files
committed
more code cleanups in org.hiberate.boot.model.internal
1 parent d1c046e commit c8b0db9

File tree

11 files changed

+268
-439
lines changed

11 files changed

+268
-439
lines changed

hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ private static <T> BasicValue.Resolution<T> createResolution(
148148
final T typeInstance = instantiateType( bootstrapContext.getServiceRegistry(),
149149
context.getBuildingOptions(), name, typeImplementorClass, instanceProducer );
150150

151-
if ( typeInstance instanceof TypeConfigurationAware ) {
152-
final TypeConfigurationAware configurationAware = (TypeConfigurationAware) typeInstance;
151+
if ( typeInstance instanceof TypeConfigurationAware configurationAware ) {
153152
configurationAware.setTypeConfiguration( typeConfiguration );
154153
}
155154

@@ -332,11 +331,10 @@ public boolean equals(Object o) {
332331
if ( this == o ) {
333332
return true;
334333
}
335-
if ( !( o instanceof TypeDefinition ) ) {
334+
if ( !(o instanceof TypeDefinition that) ) {
336335
return false;
337336
}
338337

339-
final TypeDefinition that = (TypeDefinition) o;
340338
return Objects.equals( this.name, that.name )
341339
&& Objects.equals( this.typeImplementorClass, that.typeImplementorClass )
342340
&& Arrays.equals( this.registrationKeys, that.registrationKeys )

hibernate-core/src/main/java/org/hibernate/boot/model/internal/ArrayBinder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public ArrayBinder(
2727
super( customTypeBeanResolver, buildingContext );
2828
}
2929

30+
@Override
3031
protected Collection createCollection(PersistentClass owner) {
3132
return new Array( getCustomTypeBeanResolver(), owner, getBuildingContext() );
3233
}

0 commit comments

Comments
 (0)