Delegate to Objects.equals().
This commit is contained in:
parent
682c932541
commit
d05073e66d
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue