JdbcOperations.query(String, ResultSetExtractor<T>)
is currently declared as @Nullable
. Tweaking the declaration to:
<T extends @Nullable Object> T query(String sql, ResultSetExtractor<T> rse) throws DataAccessException;
would allow the tooling to deduce the nullability of T
from the RSE
handed into the method.
Comment From: sbrannen
Although the proposed change is supported by JSpecify, it is not yet supported by NullAway.
We have therefore decided to postpone making such changes until the next 7.0 milestone or release candidate.
See Also
- https://github.com/uber/NullAway/issues/1075
- commit b6680422dbc0aebcd46a821f183dce101b5cd411