From a8172e2601b657b41f7f8294e0d1543984d943c9 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 22 Jul 2025 11:08:42 +0100 Subject: [PATCH] Revert "Polish" This reverts commit 0f612596c7937c9095399a620738b7806374eccd. --- .../main/java/org/springframework/boot/util/LambdaSafe.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java index d42fb75c4c0..701347c303c 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java @@ -349,8 +349,10 @@ public final class LambdaSafe { @Override public boolean match(Class callbackType, C callbackInstance, A argument, Object[] additionalArguments) { ResolvableType type = ResolvableType.forClass(callbackType, callbackInstance.getClass()); - return type.getGenerics().length == 1 && type.resolveGeneric() != null - && type.resolveGeneric().isInstance(argument); + if (type.getGenerics().length == 1 && type.resolveGeneric() != null) { + return type.resolveGeneric().isInstance(argument); + } + return true; } }