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 2023/10/06 13:38:06 UTC
[commons-lang] 01/02: Javadoc
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
commit 422948794ecefc44b72a3195df6d1c8e2ba0bc66
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Oct 6 09:37:35 2023 -0400
Javadoc
---
src/main/java/org/apache/commons/lang3/StringUtils.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 88614bbaa..ae9752337 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -1563,6 +1563,14 @@ public class StringUtils {
* StringUtils.defaultString("", "NULL") = ""
* StringUtils.defaultString("bat", "NULL") = "bat"
* </pre>
+ * <p>
+ * Since this is now provided by Java, instead call {@link Objects#toString(Object, String)}:
+ * </p>
+ * <pre>
+ * Objects.toString(null, "NULL") = "NULL"
+ * Objects.toString("", "NULL") = ""
+ * Objects.toString("bat", "NULL") = "bat"
+ * </pre>
*
* @see Objects#toString(Object, String)
* @see String#valueOf(Object)