Skip to content

Conversation

@gavinking
Copy link
Member

[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.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Dec 7, 2025

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [a90efa6, 3dac119, 1e8f156, 907decd, f50223b, d9be649, 0228dea]

› This message was automatically generated.

@gavinking gavinking marked this pull request as ready for review December 7, 2025 23:39
return determineMutabilityPlan( determineJavaTypeClass( javaType ), typeConfiguration );
}

public <J> MutabilityPlan<J> determineMutabilityPlan(Class<J> javaTypeClass, TypeConfiguration typeConfiguration) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method RegistryHelper.determineMutabilityPlan(..) could be confused with overloaded method
determineMutabilityPlan
, since dispatch depends on static types.
final CteContainer cteContainer = this.visitCteContainer( statement );
final SqmStatement<?> oldSqmStatement = this.currentSqmStatement;
final var oldCteContainer = cteContainer;
final var cteContainer = this.visitCteContainer( statement );

Check notice

Code scanning / CodeQL

Possible confusion of local and field Note

Confusing name: method
visitSelectStatement
also refers to field
cteContainer
(without qualifying it with 'this').
public <J> JavaType<J> findDescriptor(Class<J> javaType) {
//noinspection unchecked
return (JavaType<J>) findDescriptor( (Type) javaType );
public <J> JavaType<J> findDescriptor(Class<J> javaClass) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method JavaTypeRegistry.findDescriptor(..) could be confused with overloaded method
findDescriptor
, since dispatch depends on static types.
// }

@Internal // Can be demoted to private
public <J> JavaType<J> resolveDescriptor(

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method JavaTypeRegistry.resolveDescriptor(..) could be confused with overloaded method
resolveDescriptor
, since dispatch depends on static types.
public <J> @Nullable BasicType<J> getBasicTypeForJavaType(Class<J> javaType) {
//noinspection unchecked
return (BasicType<J>) getBasicTypeForJavaType( (Type) javaType );
public <J> @Nullable BasicType<J> getBasicTypeForJavaType(Class<J> javaClass) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method TypeConfiguration.getBasicTypeForJavaType(..) could be confused with overloaded method
getBasicTypeForJavaType
, since dispatch depends on static types.
javaTypeDescriptor -> new BasicTypeImpl<>( javaTypeDescriptor,
javaTypeDescriptor.getRecommendedJdbcType( getCurrentBaseSqlTypeIndicators() ) ) );
}
public <J> BasicType<J> standardBasicTypeForJavaType(Class<J> javaClass) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method TypeConfiguration.standardBasicTypeForJavaType(..) could be confused with overloaded method
standardBasicTypeForJavaType
, since dispatch depends on static types.
this depended on the use of uncheckable casts to generic types

enabled much less use of JavaTypeRegistry.getDescriptor()
@gavinking gavinking merged commit 8a2f5d4 into hibernate:main Dec 8, 2025
26 of 28 checks passed
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