Skip to content

Commit

Permalink
Polish "Use singleOrEmpty() instead of buffer()"
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Sep 26, 2023
1 parent cbfb99f commit f929121
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}
Expand Down

0 comments on commit f929121

Please sign in to comment.