From 9782dfb620b961aa72ae3c2a48a624ffe9f4f441 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Tue, 3 Jun 2025 13:15:58 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20nullability=20@=E2=81=A0Contract=20for=20?= =?UTF-8?q?SupplierUtils.resolve(Supplier)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes gh-34987 --- .../java/org/springframework/util/function/SupplierUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/util/function/SupplierUtils.java b/spring-core/src/main/java/org/springframework/util/function/SupplierUtils.java index e268cf5783..bc8dc05905 100644 --- a/spring-core/src/main/java/org/springframework/util/function/SupplierUtils.java +++ b/spring-core/src/main/java/org/springframework/util/function/SupplierUtils.java @@ -37,7 +37,7 @@ public abstract class SupplierUtils { * @param supplier the supplier to resolve * @return the supplier's result, or {@code null} if none */ - @Contract("null -> null; !null -> !null") + @Contract("null -> null") public static @Nullable T resolve(@Nullable Supplier supplier) { return (supplier != null ? supplier.get() : null); }