Currently second parameter of method query(String, Object[], RowCallbackHandler) is not annotated as @Nullable. It leads to warnings from IDEA if I try to pass null value there. https://github.com/spring-projects/spring-framework/blob/master/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java#L737 I think nullability of paramters should match with its brother-twin-method query(String, RowCallbackHandler, @Nullable Object...)

Comment From: sbrannen

Indeed, there are some inconsistencies there.

For example, JdbcTemplate's query(String sql, @Nullable Object[] args, ResultSetExtractor<T> rse) method has the @Nullable declaration for the Object[] argument, even though that's not the case in the JdbcOperations API.

All methods that delegate to JdbcTemplate.newArgPreparedStatementSetter(@Nullable Object[] args) internally should/could ideally allow nullable object array arguments since newArgPreparedStatementSetter() permits it.

@jhoeller, what do you think about revisiting our nullability in JdbcOperations and JdbcTemplate?