JDK-8226831 : Use Objects.equals() when appropriate
  • Type: Enhancement
  • Component: core-libs
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-06-26
  • Updated: 2019-09-03
  • Resolved: 2019-08-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b12Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
There are a few places in JDK where two Objects are compared in a null-aware way.
These can benefit from using Objects.equals(Object, Object) static method.


Comments
Some refactoring was excluded from the fix due to possible performance impact (due to JDK-8015417 which is still open at this time). Here's the webrev with the leftover, which can possibly be used at later time: http://cr.openjdk.java.net/~igerasim/8226831/01/webrev/
27-08-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/82a71d82e326 User: igerasim Date: 2019-08-27 21:44:49 +0000
27-08-2019