diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BasicProxyFactoryImpl.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BasicProxyFactoryImpl.java index ee493ca6c0..5c3201f19c 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BasicProxyFactoryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BasicProxyFactoryImpl.java @@ -6,10 +6,6 @@ */ package org.hibernate.bytecode.internal.bytebuddy; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - import org.hibernate.AssertionFailure; import org.hibernate.HibernateException; import org.hibernate.bytecode.spi.BasicProxyFactory; @@ -35,15 +31,7 @@ public class BasicProxyFactoryImpl implements BasicProxyFactory { throw new AssertionFailure( "attempting to build proxy without any superclass or interfaces" ); } - Class superClassOrMainInterface = superClass != null ? superClass : interfaces[0]; - - Set key = new HashSet(); - if ( superClass != null ) { - key.add( superClass ); - } - if ( interfaces != null && interfaces.length > 0 ) { - key.addAll( Arrays.asList( interfaces ) ); - } + final Class superClassOrMainInterface = superClass != null ? superClass : interfaces[0]; this.proxyClass = bytebuddy.getCurrentyByteBuddy() .with( new NamingStrategy.SuffixingRandom( PROXY_NAMING_SUFFIX, new NamingStrategy.SuffixingRandom.BaseNameResolver.ForFixedValue( superClassOrMainInterface.getName() ) ) ) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java index ae65f8db94..253cbdce79 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java @@ -1131,8 +1131,6 @@ public class ActionQueue { // the mapping of entity names to their latest batch numbers. private List latestBatches; - private Map entityBatchIdentifier; - // the map of batch numbers to EntityInsertAction lists private Map> actionBatches; @@ -1145,7 +1143,6 @@ public class ActionQueue { public void sort(List insertions) { // optimize the hash size to eliminate a rehash. this.latestBatches = new ArrayList<>( ); - this.entityBatchIdentifier = new HashMap<>( insertions.size() + 1, 1.0f ); this.actionBatches = new HashMap<>(); for ( AbstractEntityInsertAction action : insertions ) { @@ -1169,7 +1166,6 @@ public class ActionQueue { latestBatches.add( batchIdentifier ); } addParentChildEntityNames( action, batchIdentifier ); - entityBatchIdentifier.put( currentEntity, batchIdentifier ); addToBatch( batchIdentifier, action ); } insertions.clear();