Refine null-safety in the spring-r2dbc module
Closes gh-34160
This commit is contained in:
parent
73b24b6f7b
commit
7417bd0ac1
|
@ -138,7 +138,6 @@ public abstract class AbstractRoutingConnectionFactory implements ConnectionFact
|
||||||
* @see #setTargetConnectionFactories(Map)
|
* @see #setTargetConnectionFactories(Map)
|
||||||
* @see #setDefaultTargetConnectionFactory(Object)
|
* @see #setDefaultTargetConnectionFactory(Object)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("NullAway")
|
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
Assert.notNull(this.targetConnectionFactories, "Property 'targetConnectionFactories' must not be null");
|
Assert.notNull(this.targetConnectionFactories, "Property 'targetConnectionFactories' must not be null");
|
||||||
|
|
||||||
|
@ -217,7 +216,7 @@ public abstract class AbstractRoutingConnectionFactory implements ConnectionFact
|
||||||
* per {@link #determineCurrentLookupKey()}
|
* per {@link #determineCurrentLookupKey()}
|
||||||
* @see #determineCurrentLookupKey()
|
* @see #determineCurrentLookupKey()
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("NullAway")
|
@SuppressWarnings("NullAway") // Lambda
|
||||||
protected Mono<ConnectionFactory> determineTargetConnectionFactory() {
|
protected Mono<ConnectionFactory> determineTargetConnectionFactory() {
|
||||||
Assert.state(this.resolvedConnectionFactories != null, "ConnectionFactory router not initialized");
|
Assert.state(this.resolvedConnectionFactories != null, "ConnectionFactory router not initialized");
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ class MapBindParameterSource implements BindParameterSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("NullAway")
|
@SuppressWarnings("NullAway") // Dataflow analysis limitation
|
||||||
public Parameter getValue(String paramName) throws IllegalArgumentException {
|
public Parameter getValue(String paramName) throws IllegalArgumentException {
|
||||||
if (!hasValue(paramName)) {
|
if (!hasValue(paramName)) {
|
||||||
throw new IllegalArgumentException("No value registered for key '" + paramName + "'");
|
throw new IllegalArgumentException("No value registered for key '" + paramName + "'");
|
||||||
|
|
Loading…
Reference in New Issue