File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
hibernate-core/src/main/java/org/hibernate/tuple/entity Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 59
59
import org .checkerframework .checker .nullness .qual .Nullable ;
60
60
61
61
import static java .util .Collections .singleton ;
62
+ import static java .util .Collections .unmodifiableSet ;
62
63
import static org .hibernate .internal .CoreLogging .messageLogger ;
63
64
import static org .hibernate .internal .util .ReflectHelper .isAbstractClass ;
64
65
import static org .hibernate .internal .util .ReflectHelper .isFinalClass ;
@@ -193,10 +194,11 @@ public EntityMetamodel(
193
194
final Set <String > idAttributeNames ;
194
195
if ( identifierMapperComponent != null ) {
195
196
nonAggregatedCidMapper = identifierMapperComponent .getType ();
196
- idAttributeNames = new HashSet <>( );
197
+ HashSet < String > tmpSet = new HashSet <>();
197
198
for ( Property property : identifierMapperComponent .getProperties () ) {
198
- idAttributeNames .add ( property .getName () );
199
+ tmpSet .add ( property .getName () );
199
200
}
201
+ idAttributeNames = toSmallSet ( unmodifiableSet ( tmpSet ) );
200
202
}
201
203
else {
202
204
nonAggregatedCidMapper = null ;
You can’t perform that action at this time.
0 commit comments