Skip to content

Conversation

beikov
Copy link
Member

@beikov beikov commented Sep 10, 2025

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19556

}
else {
final Set<SqmParameter<?>> parameters = new HashSet<>( this.parameters.size() );
final Set<SqmParameter<?>> parameters = new LinkedHashSet<>( this.parameters.size() );

Check notice

Code scanning / CodeQL

Possible confusion of local and field Note

Confusing name: method
copyParameters
also refers to field
parameters
(without qualifying it with 'this').
return e1 == null ? e2 == null : e1.isCompatible( e2 );
}

static boolean areCompatible(@Nullable Collection<? extends SqmCacheable> collection1, @Nullable Collection<? extends SqmCacheable> collection2) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method SqmCacheable.areCompatible(..) could be confused with overloaded method
areCompatible
, since dispatch depends on static types.
* @author Christian Beikov
*/
public class SqmCteTable<T> extends AnonymousTupleType<T> implements JpaCteCriteriaType<T> {
public class SqmCteTable<T> extends AnonymousTupleType<T> implements JpaCteCriteriaType<T>, SqmCacheable {

Check warning

Code scanning / CodeQL

Serializable but no void constructor Warning

This class is serializable, but its non-serializable super-class
AnonymousTupleType
does not declare a no-argument constructor.
? one.getPosition().compareTo( o2.getPosition() )
: 1;
}
throw new HibernateException( "Unexpected SqmParameter type for comparison : " + this + " & " + o2 );

Check notice

Code scanning / CodeQL

Use of default toString() Note

Default toString(): inherits toString() from Object, and so is not suitable for printing.
}

public List<SqmJoin<?, ?>> getOrderedJoins() {
public @Nullable List<SqmJoin<?, ?>> getOrderedJoins() {

Check notice

Code scanning / CodeQL

Exposing internal representation Note

getOrderedJoins exposes the internal representation stored in field orderedJoins. The value may be modified
after this call to getOrderedJoins
.
…and #cacheHashCode instead of equals/hashCode
@beikov beikov merged commit 4c91a64 into hibernate:main Sep 23, 2025
23 of 25 checks passed
@beikov beikov deleted the HHH-19556 branch September 23, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant