Skip to content

Commit eb989ed

Browse files
committed
very minor changes
1 parent 7d1d6d0 commit eb989ed

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

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

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
import java.util.Locale;
99
import java.util.Map;
1010

11-
import org.hibernate.internal.util.StringHelper;
1211
import org.hibernate.type.descriptor.java.BasicJavaType;
1312

1413
import org.jboss.logging.Logger;
1514

15+
import static org.hibernate.internal.util.StringHelper.isEmpty;
16+
1617
/**
1718
* Basic implementation of {@link TypeDefinitionRegistry}.
1819
*
@@ -38,24 +39,20 @@ public TypeDefinition resolve(String typeName) {
3839
if ( localDefinition != null ) {
3940
return localDefinition;
4041
}
41-
42-
if ( parent != null ) {
42+
else if ( parent != null ) {
4343
return parent.resolve( typeName );
4444
}
45-
46-
return null;
45+
else {
46+
return null;
47+
}
4748
}
4849

4950
@Override
5051
public TypeDefinition resolveAutoApplied(BasicJavaType<?> jtd) {
51-
// For now, check the definition map for a entry keyed by the JTD name.
52-
// Ultimately should maybe have TypeDefinition or the registry keep explicit track of
53-
// auto-applied defs
54-
if ( jtd.getJavaType() == null ) {
55-
return null;
56-
}
57-
58-
return typeDefinitionMap.get( jtd.getTypeName() );
52+
// For now, check the definition map for an entry keyed by the JTD name.
53+
// Ultimately should maybe have TypeDefinition or the registry keep explicit
54+
// track of auto-applied definitions.
55+
return jtd.getJavaType() == null ? null : typeDefinitionMap.get( jtd.getTypeName() );
5956
}
6057

6158
@Override
@@ -73,7 +70,7 @@ public TypeDefinitionRegistry register(TypeDefinition typeDefinition, Duplicatio
7370
throw new IllegalArgumentException( "TypeDefinition to register cannot define null #typeImplementorClass" );
7471
}
7572

76-
if ( !StringHelper.isEmpty( typeDefinition.getName() ) ) {
73+
if ( !isEmpty( typeDefinition.getName() ) ) {
7774
register( typeDefinition.getName(), typeDefinition, duplicationStrategy );
7875
}
7976

0 commit comments

Comments
 (0)