4141import org .hibernate .internal .util .collections .CollectionHelper ;
4242
4343import static java .util .Collections .emptyMap ;
44+ import static org .hibernate .internal .util .StringHelper .isNotEmpty ;
45+ import static org .hibernate .internal .util .StringHelper .unqualify ;
4446
4547/**
4648 * @author Steve Ebersole
@@ -97,19 +99,20 @@ protected AbstractEntitySourceImpl(MappingDocument sourceMappingDocument, JaxbHb
9799 );
98100 }
99101
100- public static EntityNamingSourceImpl extractEntityNamingSource (
102+ static EntityNamingSourceImpl extractEntityNamingSource (
101103 MappingDocument sourceMappingDocument ,
102104 EntityInfo jaxbEntityMapping ) {
103105 final String className = sourceMappingDocument .qualifyClassName ( jaxbEntityMapping .getName () );
106+ final String mappingEntityName = jaxbEntityMapping .getEntityName ();
104107 final String entityName ;
105108 final String jpaEntityName ;
106- if ( StringHelper . isNotEmpty ( jaxbEntityMapping . getEntityName () ) ) {
107- entityName = jaxbEntityMapping . getEntityName () ;
108- jpaEntityName = jaxbEntityMapping . getEntityName () ;
109+ if ( isNotEmpty ( mappingEntityName ) ) {
110+ entityName = mappingEntityName ;
111+ jpaEntityName = mappingEntityName ;
109112 }
110113 else {
111114 entityName = className ;
112- jpaEntityName = StringHelper . unqualify ( className );
115+ jpaEntityName = unqualify ( className );
113116 }
114117 return new EntityNamingSourceImpl ( entityName , className , jpaEntityName );
115118 }
@@ -122,7 +125,7 @@ private FilterSource[] buildFilterSources() {
122125 return NO_FILTER_SOURCES ;
123126 }
124127
125- FilterSource [] results = new FilterSource [size ];
128+ final var results = new FilterSource [size ];
126129 for ( int i = 0 ; i < size ; i ++ ) {
127130 JaxbHbmFilterType element = jaxbClassElement .getFilter ().get ( i );
128131 results [i ] = new FilterSourceImpl ( sourceMappingDocument (), element );
0 commit comments