From b2a9e83f8430c9b8786d87c0a2191b56cf4a2705 Mon Sep 17 00:00:00 2001 From: Mengqi Xu <2663479778@qq.com> Date: Tue, 21 Jan 2025 22:53:18 +0800 Subject: [PATCH] Fix SpringProperties#getFlag document. getFlag return true when the property is equal, ignoring case, to the string "true", not just "true", "TrUe" also means true. Signed-off-by: Mengqi Xu <2663479778@qq.com> --- .../main/java/org/springframework/core/SpringProperties.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/SpringProperties.java b/spring-core/src/main/java/org/springframework/core/SpringProperties.java index 54f0d079f0a3..3097e9e5b998 100644 --- a/spring-core/src/main/java/org/springframework/core/SpringProperties.java +++ b/spring-core/src/main/java/org/springframework/core/SpringProperties.java @@ -122,7 +122,7 @@ public static void setFlag(String key) { /** * Retrieve the flag for the given property key. * @param key the property key - * @return {@code true} if the property is set to "true", + * @return {@code true} if the property is not {@code null} and is equal, ignoring case, to the string "true", * {@code} false otherwise */ public static boolean getFlag(String key) {