Skip to content

Commit d53c9aa

Browse files
dk2kbeikov
authored andcommitted
HHH-18118 fixed comparison of class field with itself
1 parent ebaba54 commit d53c9aa

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyMap.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public class EntityRepresentationStrategyMap implements EntityRepresentationStra
3939
private final ProxyFactory proxyFactory;
4040
private final EntityInstantiatorDynamicMap instantiator;
4141

42-
private final Map<String, PropertyAccess> propertyAccessMap = new ConcurrentHashMap<>();
43-
4442
public EntityRepresentationStrategyMap(
4543
PersistentClass bootType,
4644
RuntimeModelCreationContext creationContext) {
@@ -51,14 +49,6 @@ public EntityRepresentationStrategyMap(
5149
this.proxyFactory = createProxyFactory( bootType );
5250
this.instantiator = new EntityInstantiatorDynamicMap( bootType );
5351

54-
for ( Property property : bootType.getPropertyClosure() ) {
55-
//TODO: redesign how PropertyAccessors are acquired...
56-
final PropertyAccess propertyAccess = PropertyAccessStrategyMapImpl.INSTANCE
57-
.buildPropertyAccess( null, property.getName(), true );
58-
59-
propertyAccessMap.put(property.getName(), propertyAccess);
60-
}
61-
6252
createProxyFactory( bootType );
6353
}
6454

hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/internal/PatternRenderer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public PatternRenderer(String pattern, SqlAstNodeRenderingMode argumentRendering
5959
* @param argumentRenderingModes The rendering modes for arguments
6060
*/
6161
public PatternRenderer(String pattern, SqlAstNodeRenderingMode[] argumentRenderingModes) {
62-
final Set<Integer> paramNumbers = new HashSet<>();
6362
final List<String> chunkList = new ArrayList<>();
6463
final List<Integer> paramList = new ArrayList<>();
6564
final StringBuilder chunk = new StringBuilder( 10 );
@@ -98,8 +97,7 @@ else if ( c == '?' ) {
9897
vararg = paramList.size();
9998
}
10099
else {
101-
int paramNumber = Integer.valueOf( index.toString() );
102-
paramNumbers.add( paramNumber );
100+
int paramNumber = Integer.parseInt( index.toString() );
103101
paramList.add( paramNumber );
104102
index.setLength(0);
105103
if ( paramNumber > max ) {

hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/JdbcValuesSourceProcessingStateStandardImpl.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public class JdbcValuesSourceProcessingStateStandardImpl implements JdbcValuesSo
4141
private List<EntityHolder> loadingEntityHolders;
4242
private List<EntityHolder> reloadedEntityHolders;
4343
private Map<CollectionKey, LoadingCollectionEntry> loadingCollectionMap;
44-
private List<CollectionInitializer<?>> arrayInitializers;
4544

4645
private final PreLoadEvent preLoadEvent;
4746
private final PostLoadEvent postLoadEvent;
@@ -130,12 +129,6 @@ public void registerLoadingCollection(CollectionKey key, LoadingCollectionEntry
130129
}
131130

132131
loadingCollectionMap.put( key, loadingCollectionEntry );
133-
if ( loadingCollectionEntry.getInitializer() instanceof ArrayInitializer ) {
134-
if ( arrayInitializers == null ) {
135-
arrayInitializers = new ArrayList<>();
136-
}
137-
arrayInitializers.add( loadingCollectionEntry.getInitializer() );
138-
}
139132
}
140133

141134
@Override

0 commit comments

Comments
 (0)