Deprecate StringUtils.isEmpty(Object) and replace remaining usage
Closes gh-25945
This commit is contained in:
@@ -128,7 +128,6 @@ public abstract class ObjectUtils {
|
||||
* @see Optional#isPresent()
|
||||
* @see ObjectUtils#isEmpty(Object[])
|
||||
* @see StringUtils#hasLength(CharSequence)
|
||||
* @see StringUtils#isEmpty(Object)
|
||||
* @see CollectionUtils#isEmpty(java.util.Collection)
|
||||
* @see CollectionUtils#isEmpty(java.util.Map)
|
||||
*/
|
||||
|
||||
@@ -91,9 +91,10 @@ public abstract class StringUtils {
|
||||
* {@link #hasLength(String)} or {@link #hasText(String)} instead.</b>
|
||||
* @param str the candidate object (possibly a {@code String})
|
||||
* @since 3.2.1
|
||||
* @see #hasLength(String)
|
||||
* @see #hasText(String)
|
||||
* @deprecated as of 5.3, in favor of {@link #hasLength(String)} and
|
||||
* {@link #hasText(String)} (or {@link ObjectUtils#isEmpty(Object)})
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isEmpty(@Nullable Object str) {
|
||||
return (str == null || "".equals(str));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user