You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/09/01 11:21:08 UTC
(commons-lang) branch master updated: Remove extra whitespace in string comparison logic (#1439)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new b258a169d Remove extra whitespace in string comparison logic (#1439)
b258a169d is described below
commit b258a169dbb4e785065c6c0418c3bb36e2f707e0
Author: mayuming <ka...@163.com>
AuthorDate: Mon Sep 1 19:21:03 2025 +0800
Remove extra whitespace in string comparison logic (#1439)
---
src/main/java/org/apache/commons/lang3/StringUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 691724aef..1ef06f00b 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -859,7 +859,7 @@ public static int compare(final String str1, final String str2, final boolean nu
return nullIsLess ? -1 : 1;
}
if (str2 == null) {
- return nullIsLess ? 1 : - 1;
+ return nullIsLess ? 1 : -1;
}
return str1.compareTo(str2);
}