From d85a93b60b5b9b3ea92873669ac7f7fe4f305872 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Thu, 9 Jan 2025 16:08:03 +0800 Subject: [PATCH 1/2] Deprecate ConditionOutcome.inverse() Signed-off-by: Yanming Zhou See gh-43739 --- .../boot/autoconfigure/condition/ConditionOutcome.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java index da09605f4c..b52eff4b05 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java @@ -153,7 +153,10 @@ public class ConditionOutcome { * @param outcome the outcome to inverse * @return the inverse of the condition outcome * @since 1.3.0 + * @deprecated since 3.5.0 for removal in 3.6.0 in favor of + * {@link #ConditionOutcome(boolean, ConditionMessage)} */ + @Deprecated(since = "3.5.0", forRemoval = true) public static ConditionOutcome inverse(ConditionOutcome outcome) { return new ConditionOutcome(!outcome.isMatch(), outcome.getConditionMessage()); } From f8a1a6e6a1d848e2703de7277d05ad142aca043c Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 13 Jan 2025 14:46:58 -0800 Subject: [PATCH 2/2] Polish "Deprecate ConditionOutcome.inverse()" See gh-43739 --- .../boot/autoconfigure/condition/ConditionOutcome.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java index b52eff4b05..7456c00ed8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java @@ -153,7 +153,7 @@ public class ConditionOutcome { * @param outcome the outcome to inverse * @return the inverse of the condition outcome * @since 1.3.0 - * @deprecated since 3.5.0 for removal in 3.6.0 in favor of + * @deprecated since 3.5.0 for removal in 3.7.0 in favor of * {@link #ConditionOutcome(boolean, ConditionMessage)} */ @Deprecated(since = "3.5.0", forRemoval = true)