Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1046,12 +1046,12 @@
}

@Override
public int[] batchUpdate(String sql, List<Object[]> batchArgs) throws DataAccessException {
public int[] batchUpdate(String sql, List<@Nullable Object[]> batchArgs) throws DataAccessException {

Check failure on line 1049 in spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java

View workflow job for this annotation

GitHub Actions / Build Pull Request

[NullAway] Parameter has type List<@nullable Object []>, but overridden method has parameter type List<Object []>, which has mismatched type parameter nullability
return batchUpdate(sql, batchArgs, new int[0]);
}

@Override
public int[] batchUpdate(String sql, List<Object[]> batchArgs, int[] argTypes) throws DataAccessException {
public int[] batchUpdate(String sql, List<@Nullable Object[]> batchArgs, int[] argTypes) throws DataAccessException {

Check failure on line 1054 in spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java

View workflow job for this annotation

GitHub Actions / Build Pull Request

[NullAway] Parameter has type List<@nullable Object []>, but overridden method has parameter type List<Object []>, which has mismatched type parameter nullability
if (batchArgs.isEmpty()) {
return new int[0];
}
Expand All @@ -1061,9 +1061,9 @@
new BatchPreparedStatementSetter() {
@Override
public void setValues(PreparedStatement ps, int i) throws SQLException {
Object[] values = batchArgs.get(i);
@Nullable Object[] values = batchArgs.get(i);
int colIndex = 0;
for (Object value : values) {
for (@Nullable Object value : values) {
colIndex++;
if (value instanceof SqlParameterValue paramValue) {
StatementCreatorUtils.setParameterValue(ps, colIndex, paramValue, paramValue.getValue());
Expand Down
Loading