diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java index f589c29f8a..f356db973a 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java @@ -561,8 +561,7 @@ public final class SessionFactoryImpl this.typeResolver = metadata.getTypeResolver().scope( this ); this.typeHelper = new TypeLocatorImpl( typeResolver ); - this.filters = new HashMap(); - this.filters.putAll( metadata.getFilterDefinitions() ); + this.filters = new HashMap( metadata.getFilterDefinitions() ); LOG.debugf("Session factory constructed with filter configurations : %s", filters); LOG.debugf("Instantiating session factory with properties: %s", configurationService.getSettings() ); diff --git a/hibernate-core/src/main/java/org/hibernate/service/internal/SessionFactoryServiceRegistryImpl.java b/hibernate-core/src/main/java/org/hibernate/service/internal/SessionFactoryServiceRegistryImpl.java index 2433ae1a48..38bb2053ef 100644 --- a/hibernate-core/src/main/java/org/hibernate/service/internal/SessionFactoryServiceRegistryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/service/internal/SessionFactoryServiceRegistryImpl.java @@ -40,8 +40,8 @@ import org.hibernate.service.spi.SessionFactoryServiceRegistry; public class SessionFactoryServiceRegistryImpl extends AbstractServiceRegistryImpl implements SessionFactoryServiceRegistry { // for now we need to hold on to the Configuration... :( - private Configuration configuration; - private MetadataImplementor metadata; + private final Configuration configuration; + private final MetadataImplementor metadata; private final SessionFactoryImplementor sessionFactory; @SuppressWarnings( {"unchecked"})