This idiom is common enough that the platform should have a method to provide this functionality.
- duplicates
-
JDK-5006670 RFE: Please provide java.util.Objects utility class
- Closed
- relates to
-
JDK-6582946 Add suite of compare(T, T) methods for ints, longs etc
- Resolved
-
JDK-8226785 MandatoryWarningHandler.java contains implementation of Object.equals functionality
- Resolved
-
JDK-4520573 Object.equals is not well fitted for 'null' comparison
- Closed
-
JDK-8011800 Add java.util.Objects.requireNonNull(T, Supplier<String>)
- Closed
-
JDK-8014357 Minor refactorings to sun.reflect.generics.reflectiveObjects.*
- Closed
-
JDK-6891113 More methods for java.util.Objects: deepEquals, hash, toString with default
- Resolved
-
JDK-6897166 java.util.Objects.compare(...): unspecified NullPointerException for null comparator
- Closed
-
JDK-7041136 Use Objects.equals in JDK platform classes
- Closed
-
JDK-8196069 Misleading documentation of Objects.equals
- Closed
-
JDK-8223112 Clarify operational semantics of java.util.Objects.equals()
- Closed
-
JDK-8015417 profile pollution after call through invokestatic to shared code
- Open
-
JDK-6889858 Add nonNull methods to java.util.Objects
- Resolved
-
JDK-8310571 Use inline @return tag on java.util.Objects
- Resolved
-
JDK-7068795 Make java.util.Objects#equals generic
- Closed