From d1e72ebede93d73d1a3caf74e391fd83516e0685 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Mon, 20 Aug 2018 19:01:46 +0200 Subject: [PATCH] LANG-1411: Add changes.xml entry and @since tags. This fixes #342 from GitHub. Thanks to Alexander Tsvetkov. --- src/changes/changes.xml | 3 ++- src/main/java/org/apache/commons/lang3/ObjectUtils.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 4a1167640..5e87a0b4e 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -45,7 +45,8 @@ The type attribute can be add,update,fix,remove. - + + Add isEmpty method to ObjectUtils diff --git a/src/main/java/org/apache/commons/lang3/ObjectUtils.java b/src/main/java/org/apache/commons/lang3/ObjectUtils.java index 6934f230c..4a84c4fc5 100644 --- a/src/main/java/org/apache/commons/lang3/ObjectUtils.java +++ b/src/main/java/org/apache/commons/lang3/ObjectUtils.java @@ -103,6 +103,7 @@ public ObjectUtils() { * @param object the {@code Object} to test, may be {@code null} * @return {@code true} if the object has a supported type and is empty or null, * {@code false} otherwise + * @since 3.9 */ public static boolean isEmpty(final Object object) { if (object == null) { @@ -146,6 +147,7 @@ public static boolean isEmpty(final Object object) { * @param object the {@code Object} to test, may be {@code null} * @return {@code true} if the object has an unsupported type or is not empty * and not null, {@code false} otherwise + * @since 3.9 */ public static boolean isNotEmpty(final Object object) { return !isEmpty(object);