Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in: - spring-jdbc - spring-r2dbc - spring-orm - spring-beans - spring-aop See gh-32475
This commit is contained in:
@@ -142,6 +142,7 @@ public abstract class AbstractRoutingConnectionFactory implements ConnectionFact
|
||||
* @see #setTargetConnectionFactories(Map)
|
||||
* @see #setDefaultTargetConnectionFactory(Object)
|
||||
*/
|
||||
@SuppressWarnings("NullAway")
|
||||
public void initialize() {
|
||||
Assert.notNull(this.targetConnectionFactories, "Property 'targetConnectionFactories' must not be null");
|
||||
|
||||
@@ -220,6 +221,7 @@ public abstract class AbstractRoutingConnectionFactory implements ConnectionFact
|
||||
* per {@link #determineCurrentLookupKey()}
|
||||
* @see #determineCurrentLookupKey()
|
||||
*/
|
||||
@SuppressWarnings("NullAway")
|
||||
protected Mono<ConnectionFactory> determineTargetConnectionFactory() {
|
||||
Assert.state(this.resolvedConnectionFactories != null, "ConnectionFactory router not initialized");
|
||||
|
||||
|
||||
@@ -383,6 +383,7 @@ final class DefaultDatabaseClient implements DatabaseClient {
|
||||
return fetch().rowsUpdated().then();
|
||||
}
|
||||
|
||||
@SuppressWarnings("NullAway")
|
||||
private ResultFunction getResultFunction(Supplier<String> sqlSupplier) {
|
||||
BiFunction<Connection, String, Statement> statementFunction = (connection, sql) -> {
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
@@ -75,6 +75,7 @@ class MapBindParameterSource implements BindParameterSource {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("NullAway")
|
||||
public Parameter getValue(String paramName) throws IllegalArgumentException {
|
||||
if (!hasValue(paramName)) {
|
||||
throw new IllegalArgumentException("No value registered for key '" + paramName + "'");
|
||||
|
||||
Reference in New Issue
Block a user