-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Apply null annotations in org.hibernate.query.sqm.tree #11178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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 › This message was automatically generated. |
|
|
||
| @Override | ||
| public AbstractIdentifiableType<? super J> getSuperType() { | ||
| public @Nullable AbstractIdentifiableType<? super J> getSuperType() { |
Check notice
Code scanning / CodeQL
Confusing method names because of capitalization
|
|
||
| @Override | ||
| JpaJoin<L, R> on(Expression<Boolean> restriction); | ||
| JpaJoin<L, R> on(@Nullable Expression<Boolean> restriction); |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
|
|
||
| @Override | ||
| JpaJoin<L, R> on(Predicate... restrictions); | ||
| JpaJoin<L, R> on(Predicate @Nullable... restrictions); |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
| JpaQueryStructure<T> setRestriction(@Nullable JpaPredicate restriction); | ||
|
|
||
| JpaQueryStructure<T> setRestriction(Expression<Boolean> restriction); | ||
| JpaQueryStructure<T> setRestriction(@Nullable Expression<Boolean> restriction); |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
| JpaQueryStructure<T> setGroupRestriction(@Nullable JpaPredicate restrictions); | ||
|
|
||
| JpaQueryStructure<T> setGroupRestriction(Expression<Boolean> restriction); | ||
| JpaQueryStructure<T> setGroupRestriction(@Nullable Expression<Boolean> restriction); |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
| return getRegisteredType( javaType.getTypeName() ); | ||
| } | ||
|
|
||
| public <J> BasicType<J> getRegisteredType(Class<J> javaType) { | ||
| public <J> @Nullable BasicType<J> getRegisteredType(Class<J> javaType) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
| SqmBindableType<?> firstType, | ||
| SqmBindableType<?> secondType, | ||
| public @Nullable SqmBindableType<?> resolveArithmeticType( | ||
| @Nullable SqmBindableType<?> firstType, |
Check notice
Code scanning / CodeQL
Useless parameter
| return type == null ? null | ||
| : getSqlTemporalType( type.getRelationalJavaType() | ||
| .getRecommendedJdbcType( getCurrentBaseSqlTypeIndicators() ) ); | ||
|
|
||
| } | ||
|
|
||
| @SuppressWarnings("deprecation") | ||
| public static TemporalType getSqlTemporalType(JdbcMapping jdbcMapping) { | ||
| public static @Nullable TemporalType getSqlTemporalType(JdbcMapping jdbcMapping) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
| return getSqlTemporalType( jdbcMapping.getJdbcType() ); | ||
| } | ||
|
|
||
| @SuppressWarnings("deprecation") | ||
| public static TemporalType getSqlTemporalType(JdbcMappingContainer jdbcMappings) { | ||
| public static @Nullable TemporalType getSqlTemporalType(JdbcMappingContainer jdbcMappings) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
| assert jdbcMappings.getJdbcTypeCount() == 1; | ||
| return getSqlTemporalType( jdbcMappings.getSingleJdbcMapping().getJdbcType() ); | ||
| } | ||
|
|
||
| @SuppressWarnings("deprecation") | ||
| public static TemporalType getSqlTemporalType(MappingModelExpressible<?> type) { | ||
| public static @Nullable TemporalType getSqlTemporalType(MappingModelExpressible<?> type) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods
81f6097 to
ab76089
Compare
ab76089 to
9d0afa0
Compare
9d0afa0 to
e4b71af
Compare
Fixed potential NPEs in/for:
ArrayViaElementArgumentReturnTypeResolverSqmPathRegistry#resolveFromSqmCriteriaNodeBuilder#createNullifFunctionNodeSqmBasicValuedSimplePath#getJavaTypeClassSqmWindowFramemethodsequals/hashCode/isCompatible/cacheHashCodeSqmConflictUpdateAction#whereSqmDynamicInstantiation#checkInstantiationSqmQuerySpecmethodsetRestriction/setGroupRestriction/collectSelectedFromSetSqmSubQuery#getTupleLengthAbstractSqmRestrictedDmlStatement#setWhereAlso:
SqmPathRegistry#resolveFromByPathto return non-null value contrary tofindFromByPathSqmFieldLiteralimplementation by extending AbstractSqmExpressionjakarta.persistence.criteria.AbstractQuery#getResultTypecontract to be non-nullHibernateCriteriaBuilder#unwrapcontract to be non-nullNullSqmExpressiblein favor of usingnull, since the Parameter type is nullable anywaySqmFromClause#appendHqlStringnot handling certain types of Sqm root and join nodesAbstractSqmSelectQuery#getSelectionto behave according to JPA specSqmSubQuerymethodsgetSelection/getCompoundSelectionItems/isCompoundSelectionto behave according to JPA specSqmFromClauseandSqmSelectClauseinSqmQuerySpecfinal and non-nullSqmSetClauseinSqmUpdateStatementnon-nullBy 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.