Use Object.equals() where feasible

See gh-31916
This commit is contained in:
Yanming Zhou
2023-12-28 15:26:12 +08:00
committed by Stéphane Nicoll
parent a6e87b40c7
commit 72a9864788
9 changed files with 19 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonView;
import jakarta.jms.BytesMessage;
@@ -285,7 +286,7 @@ class MappingJackson2MessageConverterTests {
return false;
}
MyBean bean = (MyBean) o;
if (foo != null ? !foo.equals(bean.foo) : bean.foo != null) {
if (!Objects.equals(foo, bean.foo)) {
return false;
}
return true;