You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2022/11/25 12:30:00 UTC
[maven-shared-utils] 01/01: Update Xpp3DomUtils.java
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch elharo-patch-1
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
commit f92114182d3f80dc0fe8ee6a58325ee21ab9c1f9
Author: Elliotte Rusty Harold <el...@users.noreply.github.com>
AuthorDate: Fri Nov 25 12:29:53 2022 +0000
Update Xpp3DomUtils.java
deprecate a string utility method that doesn't belong in this package and is duplicated in 72 other places
@slawekjaranowski
---
.../java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java
index 1b10dc8..e4d1f30 100644
--- a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java
+++ b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java
@@ -148,15 +148,14 @@ public class Xpp3DomUtils
}
/**
- * @param str The string to be checked.
- * @return <code>true</code> in case string is empty <code>false</code> otherwise.
+ * @deprecated use <code>String.isBlank()</code> (Java 11+) or <code>org.apache.commons.lang3.StringUtils.isBlank()</code>
+ * @param str the string to be checked
+ * @return <code>true</code> if the string is null, empty, or whitespace only; <code>false</code> otherwise
*/
+ @Deprecated
public static boolean isEmpty( String str )
{
return str == null || str.trim().length() == 0;
}
-
-
-
}