Skip to content

Specify flexible generics nullness in spring-jdbc #34911

Closed
@odrotbohm

Description

@odrotbohm

Overview

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 tooling to deduce the nullability of T from the ResultSetExtractor handed into the method.

Metadata

Metadata

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions