Polish "Use singleOrEmpty() instead of buffer()"
See gh-31282
This commit is contained in:
@@ -61,7 +61,7 @@ class DefaultFetchSpec<T> implements FetchSpec<T> {
|
||||
public Mono<T> one() {
|
||||
return all().singleOrEmpty()
|
||||
.onErrorMap(IndexOutOfBoundsException.class, ex -> {
|
||||
String message = String.format("Query [%s] returned non unique result.", resultFunction.getSql());
|
||||
String message = String.format("Query [%s] returned non unique result.", this.resultFunction.getSql());
|
||||
return new IncorrectResultSizeDataAccessException(message, 1);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user