HHH-18875 Avoid using the deprecated constructors of StandardStack

This commit is contained in:
Sanne Grinovero 2024-11-22 13:07:38 +00:00 committed by Sanne Grinovero
parent 76b31050f1
commit 3d0545e2a8
8 changed files with 18 additions and 19 deletions

View File

@ -64,9 +64,9 @@ public class GraphParser extends GraphLanguageParserBaseVisitor {
private final SessionFactoryImplementor sessionFactory;
private final Stack<GraphImplementor> graphStack = new StandardStack<>( GraphImplementor.class );
private final Stack<AttributeNodeImplementor> attributeNodeStack = new StandardStack<>( AttributeNodeImplementor.class );
private final Stack<SubGraphGenerator> graphSourceStack = new StandardStack<>(SubGraphGenerator.class);
private final Stack<GraphImplementor> graphStack = new StandardStack<>();
private final Stack<AttributeNodeImplementor> attributeNodeStack = new StandardStack<>();
private final Stack<SubGraphGenerator> graphSourceStack = new StandardStack<>();
public GraphParser(SessionFactoryImplementor sessionFactory) {
this.sessionFactory = sessionFactory;

View File

@ -308,8 +308,8 @@ public class SemanticQueryBuilder<R> extends HqlParserBaseVisitor<Object> implem
private final Stack<DotIdentifierConsumer> dotIdentifierConsumerStack;
private final Stack<ParameterDeclarationContext> parameterDeclarationContextStack = new StandardStack<>( ParameterDeclarationContext.class );
private final Stack<SqmCreationProcessingState> processingStateStack = new StandardStack<>( SqmCreationProcessingState.class );
private final Stack<ParameterDeclarationContext> parameterDeclarationContextStack = new StandardStack<>();
private final Stack<SqmCreationProcessingState> processingStateStack = new StandardStack<>();
private final BasicDomainType<Integer> integerDomainType;
private final JavaType<List<?>> listJavaType;
@ -382,7 +382,6 @@ public class SemanticQueryBuilder<R> extends HqlParserBaseVisitor<Object> implem
this.creationContext = creationContext;
this.query = query;
this.dotIdentifierConsumerStack = new StandardStack<>(
DotIdentifierConsumer.class,
new BasicDotIdentifierConsumer( this )
);
this.parameterStyle = creationOptions.useStrictJpaCompliance()

View File

@ -77,7 +77,7 @@ public class DomainResultCreationStateImpl
private final LegacyFetchResolver legacyFetchResolver;
private final SessionFactoryImplementor sessionFactory;
private final Stack<Function> fetchBuilderResolverStack = new StandardStack<>( Function.class, fetchableName -> null );
private final Stack<Function> fetchBuilderResolverStack = new StandardStack<>( fetchableName -> null );
private Map<String, LockMode> registeredLockModes;
private boolean processingKeyFetches = false;
private boolean resolvingCircularFetch;

View File

@ -488,7 +488,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
private boolean deduplicateSelectionItems;
private ForeignKeyDescriptor.Nature currentlyResolvingForeignKeySide;
private SqmStatement<?> currentSqmStatement;
private Stack<SqmQueryPart> sqmQueryPartStack = new StandardStack<>( SqmQueryPart.class );
private Stack<SqmQueryPart> sqmQueryPartStack = new StandardStack<>();
private CteContainer cteContainer;
/**
* A map from {@link SqmCteTable#getCteName()} to the final SQL name.
@ -506,8 +506,8 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
private List<Map.Entry<OrderByFragment, TableGroup>> orderByFragments;
private final SqlAliasBaseManager sqlAliasBaseManager = new SqlAliasBaseManager();
private final Stack<SqlAstProcessingState> processingStateStack = new StandardStack<>( SqlAstProcessingState.class );
private final Stack<FromClauseIndex> fromClauseIndexStack = new StandardStack<>( FromClauseIndex.class );
private final Stack<SqlAstProcessingState> processingStateStack = new StandardStack<>();
private final Stack<FromClauseIndex> fromClauseIndexStack = new StandardStack<>();
// Captures all entity name uses under which a table group is being used within the current conjunct.
// Outside a top level conjunct, it represents the "global uses" i.e. select, from, group and order by clauses.
@ -521,9 +521,9 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
private SqmJoin<?, ?> currentlyProcessingJoin;
protected Predicate additionalRestrictions;
private final Stack<Clause> currentClauseStack = new StandardStack<>( Clause.class );
private final Stack<Supplier> inferrableTypeAccessStack = new StandardStack<>( Supplier.class );
private final Stack<List> queryTransformers = new StandardStack<>( List.class );
private final Stack<Clause> currentClauseStack = new StandardStack<>();
private final Stack<Supplier> inferrableTypeAccessStack = new StandardStack<>();
private final Stack<List> queryTransformers = new StandardStack<>();
private boolean inTypeInference;
private boolean inImpliedResultTypeInference;
private boolean inNestedContext;

View File

@ -304,9 +304,9 @@ public abstract class AbstractSqlAstTranslator<T extends JdbcOperation> implemen
private final ParameterMarkerStrategy parameterMarkerStrategy;
private final Stack<Clause> clauseStack = new StandardStack<>( Clause.class );
private final Stack<QueryPart> queryPartStack = new StandardStack<>( QueryPart.class );
private final Stack<Statement> statementStack = new StandardStack<>( Statement.class );
private final Stack<Clause> clauseStack = new StandardStack<>();
private final Stack<QueryPart> queryPartStack = new StandardStack<>();
private final Stack<Statement> statementStack = new StandardStack<>();
private final Dialect dialect;
private final Set<String> affectedTableNames = new HashSet<>();

View File

@ -45,7 +45,7 @@ public class DomainResultGraphPrinter {
}
private final StringBuilder buffer;
private final Stack<FetchParent> fetchParentStack = new StandardStack<>( FetchParent.class );
private final Stack<FetchParent> fetchParentStack = new StandardStack<>();
private DomainResultGraphPrinter(String header) {
buffer = new StringBuilder( header + ":" + System.lineSeparator() );

View File

@ -24,7 +24,7 @@ public class LoadContexts {
private static final CoreMessageLogger log = CoreLogging.messageLogger( LoadContexts.class );
private final PersistenceContext persistenceContext;
private final StandardStack<JdbcValuesSourceProcessingState> jdbcValuesSourceProcessingStateStack = new StandardStack<>( JdbcValuesSourceProcessingState.class );
private final StandardStack<JdbcValuesSourceProcessingState> jdbcValuesSourceProcessingStateStack = new StandardStack<>();
public LoadContexts(PersistenceContext persistenceContext) {
this.persistenceContext = persistenceContext;

View File

@ -146,7 +146,7 @@ public class StandardStackTest {
// utility functions
private Stack<Integer> allocateStack(int size) {
final Stack<Integer> stack = new StandardStack<>( Integer.class );
final Stack<Integer> stack = new StandardStack<>();
for ( int i = 0; i < size; i++ ) {
stack.push( i );
}