fix a couple of warnings

This commit is contained in:
Gavin King 2024-03-25 12:43:11 +01:00
parent 6eb01d2832
commit b75cccfc4d
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,6 @@ import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
import org.hibernate.StatelessSession;
import org.hibernate.boot.spi.SessionFactoryOptions;
import org.hibernate.event.spi.AutoFlushEvent;
import org.hibernate.event.spi.EventSource;
import org.hibernate.graph.GraphSemantic;
import org.hibernate.query.Query;

View File

@ -41,6 +41,7 @@ import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.spi.EntityKey;
import org.hibernate.engine.spi.ExceptionConverter;
import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.engine.spi.LoadQueryInfluencers;
import org.hibernate.engine.spi.SessionEventListenerManager;
import org.hibernate.engine.spi.SessionFactoryImplementor;
@ -251,8 +252,8 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
protected final void setupAutoEnabledFilters(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) {
factory.getDefinedFilterNames()
.stream()
.map( filterName -> factory.getFilterDefinition( filterName ) )
.filter( filterDefinition -> filterDefinition.isAutoEnabled() )
.map(factory::getFilterDefinition)
.filter(FilterDefinition::isAutoEnabled)
.forEach( filterDefinition -> loadQueryInfluencers.enableFilter( filterDefinition.getFilterName() ) );
}