Refine null-safety in the spring-r2dbc module

Closes gh-34160
This commit is contained in:
Sébastien Deleuze 2024-12-26 16:29:27 +01:00
parent 73b24b6f7b
commit 7417bd0ac1
2 changed files with 2 additions and 3 deletions

View File

@ -138,7 +138,6 @@ 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");
@ -217,7 +216,7 @@ public abstract class AbstractRoutingConnectionFactory implements ConnectionFact
* per {@link #determineCurrentLookupKey()}
* @see #determineCurrentLookupKey()
*/
@SuppressWarnings("NullAway")
@SuppressWarnings("NullAway") // Lambda
protected Mono<ConnectionFactory> determineTargetConnectionFactory() {
Assert.state(this.resolvedConnectionFactories != null, "ConnectionFactory router not initialized");

View File

@ -75,7 +75,7 @@ class MapBindParameterSource implements BindParameterSource {
}
@Override
@SuppressWarnings("NullAway")
@SuppressWarnings("NullAway") // Dataflow analysis limitation
public Parameter getValue(String paramName) throws IllegalArgumentException {
if (!hasValue(paramName)) {
throw new IllegalArgumentException("No value registered for key '" + paramName + "'");