squash a couple of warnings in IntelliJ

use requireService()
This commit is contained in:
Gavin King 2024-03-16 20:48:21 +01:00
parent 75e3ef9383
commit 1ba67c2de9
4 changed files with 8 additions and 9 deletions

View File

@ -254,8 +254,8 @@ public final class FastSessionServices {
: null;
this.classLoaderService = serviceRegistry.requireService( ClassLoaderService.class );
this.transactionCoordinatorBuilder = serviceRegistry.getService( TransactionCoordinatorBuilder.class );
this.jdbcServices = serviceRegistry.getService( JdbcServices.class );
this.entityCopyObserverFactory = serviceRegistry.getService( EntityCopyObserverFactory.class );
this.jdbcServices = serviceRegistry.requireService( JdbcServices.class );
this.entityCopyObserverFactory = serviceRegistry.requireService( EntityCopyObserverFactory.class );
this.jdbcValuesMappingProducerProvider = serviceRegistry.getService( JdbcValuesMappingProducerProvider.class );
@ -401,6 +401,7 @@ public final class FastSessionServices {
return preferredSqlTypeCodeForBoolean;
}
@Deprecated(forRemoval = true) //This seems no longer used - cleanup?
public TimeZoneStorageStrategy getDefaultTimeZoneStorageStrategy() {
return defaultTimeZoneStorageStrategy;
}
@ -423,7 +424,7 @@ public final class FastSessionServices {
return xmlFormatMapper;
}
@Deprecated //This seems no longer used - cleanup?
@Deprecated(forRemoval = true) //This seems no longer used - cleanup?
public MutationExecutorService getMutationExecutorService() {
return mutationExecutorService;
}

View File

@ -19,7 +19,6 @@ import org.hibernate.bytecode.enhance.spi.interceptor.BytecodeLazyAttributeInter
import org.hibernate.engine.spi.CompositeOwner;
import org.hibernate.engine.spi.CompositeTracker;
import org.hibernate.engine.spi.PersistentAttributeInterceptor;
import org.hibernate.internal.util.NullnessHelper;
import org.hibernate.internal.util.NullnessUtil;
import jakarta.persistence.Access;

View File

@ -54,7 +54,7 @@ public class PropertyAccessStrategyBackRefImpl implements PropertyAccessStrategy
}
private static class PropertyAccessBackRefImpl implements PropertyAccess {
private PropertyAccessStrategyBackRefImpl strategy;
private final PropertyAccessStrategyBackRefImpl strategy;
private final GetterImpl getter;

View File

@ -212,7 +212,6 @@ import org.hibernate.sql.model.internal.TableUpdateCustomSql;
import org.hibernate.sql.model.internal.TableUpdateStandard;
import org.hibernate.sql.results.internal.SqlSelectionImpl;
import org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducer;
import org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducerProvider;
import org.hibernate.type.BasicType;
import org.hibernate.type.SqlTypes;
import org.hibernate.type.StandardBasicTypes;
@ -890,10 +889,10 @@ public abstract class AbstractSqlAstTranslator<T extends JdbcOperation> implemen
}
private JdbcValuesMappingProducer buildJdbcValuesMappingProducer(SelectStatement selectStatement) {
final JdbcValuesMappingProducerProvider producerProvider = getSessionFactory()
return getSessionFactory()
.getFastSessionServices()
.getJdbcValuesMappingProducerProvider();
return producerProvider.buildMappingProducer( selectStatement, getSessionFactory() );
.getJdbcValuesMappingProducerProvider()
.buildMappingProducer( selectStatement, getSessionFactory() );
}
protected int getRowsToSkip(SelectStatement sqlAstSelect, JdbcParameterBindings jdbcParameterBindings) {