mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Fix NullAway suppression in DataSourceHealthIndicator
See gh-46587
This commit is contained in:
+3
-7
@@ -175,13 +175,9 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
|
||||
if (columns != 1) {
|
||||
throw new IncorrectResultSetColumnCountException(1, columns);
|
||||
}
|
||||
return getResultSetValue(rs);
|
||||
}
|
||||
|
||||
// RowMapper.mapRow isn't defined as @Nullable return type
|
||||
@SuppressWarnings("NullAway")
|
||||
private Object getResultSetValue(ResultSet rs) throws SQLException {
|
||||
return JdbcUtils.getResultSetValue(rs, 1);
|
||||
Object result = JdbcUtils.getResultSetValue(rs, 1);
|
||||
Assert.state(result != null, "'result' must not be null");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user