Delegate to Objects.equals().

This commit is contained in:
Gary Gregory 2021-08-24 11:50:50 -04:00
parent 682c932541
commit d05073e66d
1 changed files with 2 additions and 8 deletions

View File

@ -625,13 +625,7 @@ public class ObjectUtils {
*/
@Deprecated
public static boolean equals(final Object object1, final Object object2) {
if (object1 == object2) {
return true;
}
if (object1 == null || object2 == null) {
return false;
}
return object1.equals(object2);
return Objects.equals(object1, object2);
}
/**
@ -1184,7 +1178,7 @@ public class ObjectUtils {
* @return {@code false} if the values of both objects are the same
*/
public static boolean notEqual(final Object object1, final Object object2) {
return !equals(object1, object2);
return !Objects.equals(object1, object2);
}
/**