From f9291214ec651abd5169b353afe37251a72401c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Tue, 26 Sep 2023 12:35:30 +0200 Subject: [PATCH] Polish "Use `singleOrEmpty()` instead of `buffer()`" See gh-31282 --- .../java/org/springframework/r2dbc/core/DefaultFetchSpec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DefaultFetchSpec.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DefaultFetchSpec.java index d96cad5bcc25..f6de827037e1 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DefaultFetchSpec.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DefaultFetchSpec.java @@ -61,7 +61,7 @@ class DefaultFetchSpec implements FetchSpec { public Mono 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); }); }