Skip to content

Commit 7417bd0

Browse files
committed
Refine null-safety in the spring-r2dbc module
Closes gh-34160
1 parent 73b24b6 commit 7417bd0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/lookup/AbstractRoutingConnectionFactory.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public void afterPropertiesSet() {
138138
* @see #setTargetConnectionFactories(Map)
139139
* @see #setDefaultTargetConnectionFactory(Object)
140140
*/
141-
@SuppressWarnings("NullAway")
142141
public void initialize() {
143142
Assert.notNull(this.targetConnectionFactories, "Property 'targetConnectionFactories' must not be null");
144143

@@ -217,7 +216,7 @@ public ConnectionFactoryMetadata getMetadata() {
217216
* per {@link #determineCurrentLookupKey()}
218217
* @see #determineCurrentLookupKey()
219218
*/
220-
@SuppressWarnings("NullAway")
219+
@SuppressWarnings("NullAway") // Lambda
221220
protected Mono<ConnectionFactory> determineTargetConnectionFactory() {
222221
Assert.state(this.resolvedConnectionFactories != null, "ConnectionFactory router not initialized");
223222

spring-r2dbc/src/main/java/org/springframework/r2dbc/core/MapBindParameterSource.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public boolean hasValue(String paramName) {
7575
}
7676

7777
@Override
78-
@SuppressWarnings("NullAway")
78+
@SuppressWarnings("NullAway") // Dataflow analysis limitation
7979
public Parameter getValue(String paramName) throws IllegalArgumentException {
8080
if (!hasValue(paramName)) {
8181
throw new IllegalArgumentException("No value registered for key '" + paramName + "'");

0 commit comments

Comments
 (0)