Deprecate StringUtils.isEmpty(Object) and replace remaining usage

Closes gh-25945
This commit is contained in:
Juergen Hoeller
2020-10-21 16:09:26 +02:00
parent 07769ddcc6
commit 621295dbd8
8 changed files with 13 additions and 15 deletions

View File

@@ -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)
*/

View File

@@ -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));
}