Skip to content

GH-10083: Apply Nullability to Core expression package #10265

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

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

artembilan
Copy link
Member

Related to: #10083

  • Make SupplierExpression as to not return null for result of the provided Supplier. And fix Nullability from the super contract
  • Make ValueExpression compatible with super contract, but still ensure not null for return value
  • Make DynamicExpression compatible with super contract. Provide usability and code style refactoring
  • Make FunctionExpression to be compatible with super contract. At the same time ensure that input for the function is not null, but result of function could be null. Some other code style and usability refactoring
  • Remove redundant logic in the ExpressionUtils which is deliberately not reachable due to Nullability
  • Fix Nullability for the ReloadableResourceBundleExpressionSource and some simple refactoring according to IDE report.
  • Make ExpressionEvalMap to be aware of null values after expressions evaluation.
  • Fix usage of the ExpressionEvalMap in the project.
  • Mark CassandraMessageHandler.setQuery() with NullAway since ExpressionEvalMap may produce nulls, and Cassandra driver can deal with nulls, but that is not expressed on the API with Nullability
  • Fix ThreadStatePropagationChannelInterceptor for wrong import for the @Nullable
  • Slight change in the GraphQlMessageHandler according to the mentioned above expression package fixes

Related to: spring-projects#10083

* Make `SupplierExpression` as to not return null for result of the provided `Supplier`.
And fix Nullability from the super contract
* Make `ValueExpression` compatible with super contract, but still ensure not null for return value
* Make `DynamicExpression` compatible with super contract.
Provide usability and code style refactoring
* Make `FunctionExpression` to be compatible with super contract.
At the same time ensure that input for the function is not null, but result of function could be null.
Some other code style and usability refactoring
* Remove redundant logic in the `ExpressionUtils` which is deliberately not reachable due to Nullability
* Fix Nullability for the `ReloadableResourceBundleExpressionSource` and some simple refactoring according to IDE report.
* Make `ExpressionEvalMap` to be aware of null values after expressions evaluation.
* Fix usage of the `ExpressionEvalMap` in the project.
* Mark `CassandraMessageHandler.setQuery()` with `NullAway` since `ExpressionEvalMap` may produce nulls,
and Cassandra driver can deal with nulls, but that is not expressed on the API with Nullability
* Fix `ThreadStatePropagationChannelInterceptor` for wrong import for the `@Nullable`
* Slight change in the `GraphQlMessageHandler` according to the mentioned above `expression` package fixes
@cppwfs
Copy link
Contributor

cppwfs commented Jul 28, 2025

LGTM
Great Work!

@cppwfs cppwfs merged commit 86364cc into spring-projects:main Jul 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants