HHH-8776 add more 'final' keywords to align with existing coding style

This commit is contained in:
Nathan Xu 2020-01-24 14:28:28 -05:00 committed by Steve Ebersole
parent d02ce91e9c
commit 3eb49972f3
2 changed files with 4 additions and 6 deletions

View File

@ -187,11 +187,10 @@ public final class TwoPhaseLoad {
String[] propertyNames = persister.getPropertyNames();
final Type[] types = persister.getPropertyTypes();
GraphImplementor<?> fetchGraphContext = session.getFetchGraphLoadContext();
final GraphImplementor<?> fetchGraphContext = session.getFetchGraphLoadContext();
for ( int i = 0; i < hydratedState.length; i++ ) {
final Object value = hydratedState[i];
if ( debugEnabled ) {
LOG.debugf(
"Processing attribute `%s` : value = %s",
@ -457,11 +456,11 @@ public final class TwoPhaseLoad {
}
private static Boolean isEagerFetchGraph(SharedSessionContractImplementor session, String associationName, Type associationType) {
GraphImplementor<?> context = session.getFetchGraphLoadContext();
final GraphImplementor<?> context = session.getFetchGraphLoadContext();
if ( context != null ) {
// 'fetch graph' is in effect, so null should not be returned
AttributeNodeImplementor<Object> attributeNode = context.findAttributeNode( associationName );
final AttributeNodeImplementor<Object> attributeNode = context.findAttributeNode( associationName );
if ( attributeNode != null ) {
if ( associationType.isCollectionType() ) {
// to do: deal with Map's key and value
@ -469,7 +468,7 @@ public final class TwoPhaseLoad {
}
else {
// set 'fetchGraphContext' to sub-graph so graph is explored further (internal loading)
GraphImplementor<?> subContext = attributeNode.getSubGraphMap().get( associationType.getReturnedClass() );
final GraphImplementor<?> subContext = attributeNode.getSubGraphMap().get( associationType.getReturnedClass() );
if ( subContext != null ) {
session.setFetchGraphLoadContext( subContext );
}

View File

@ -41,7 +41,6 @@ import org.hibernate.query.spi.ScrollableResultsImplementor;
import org.hibernate.resource.jdbc.spi.JdbcSessionOwner;
import org.hibernate.resource.transaction.spi.TransactionCoordinator;
import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder.Options;
import org.hibernate.type.Type;
import org.hibernate.type.descriptor.WrapperOptions;
/**