Skip to content

Commit f929121

Browse files
committed
Polish "Use singleOrEmpty() instead of buffer()"
See gh-31282
1 parent cbfb99f commit f929121

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class DefaultFetchSpec<T> implements FetchSpec<T> {
6161
public Mono<T> one() {
6262
return all().singleOrEmpty()
6363
.onErrorMap(IndexOutOfBoundsException.class, ex -> {
64-
String message = String.format("Query [%s] returned non unique result.", resultFunction.getSql());
64+
String message = String.format("Query [%s] returned non unique result.", this.resultFunction.getSql());
6565
return new IncorrectResultSizeDataAccessException(message, 1);
6666
});
6767
}

0 commit comments

Comments
 (0)