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 6, 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: [9d927bb, 69b7b8b, 074b880, dfef08f, a9f015e, aaf0f6b, 15a4b3d, b2ed4c5, d05f048, 4bc00b6]

› This message was automatically generated.

final SharedSessionContractImplementor session) throws SQLException {
//noinspection unchecked
nullSafeSet( st, (T) value, index, (WrapperOptions) session );
final SharedSessionContractImplementor session)

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method AbstractStandardBasicType.nullSafeSet(..) could be confused with overloaded method
nullSafeSet
, since dispatch depends on static types.
}
if ( Integer.class.isAssignableFrom( type ) ) {
return (X) (Integer) Integer.parseInt( value );
return type.cast( Integer.parseInt( value ) );

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
}
if ( Long.class.isAssignableFrom( type ) ) {
return (X) (Long) Long.parseLong( value );
return type.cast( Long.parseLong( value ) );

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
I don't know why we even need to be doing this. We deprecated that stuff.
But we have one single test which is relying on this, so perhaps users
are using it too.
return wrapped;
}

private <X> T[] wrapObjectArray(X value, Object[] array, WrapperOptions options) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'value' is never used.
and fix unchecked casts in the impl
this change exposed multiple bugs!

1. generic attributes declared by a mapped superclass where
   not being handled properly in HQL path expressions
2. getSubTypes() on EntityTypeImpl was broken (due, again,
   to use of unchecked cast!) causing problems in HQL
@gavinking gavinking marked this pull request as ready for review December 7, 2025 14:52
@gavinking gavinking merged commit ccf42f0 into hibernate:main Dec 7, 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