Details
-
Bug
-
Resolution: Fixed
-
P3
-
16
-
b29
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8258363 | 17 | Vicente Arturo Romero Zaldivar | P3 | Resolved | Fixed | b02 |
Description
The changes as part of JDK-8256861:
1. Update the JLS to base equality of record classes on the "value of the component field", rather than the value returned by the component accessor.
2. Update the equality of primitives to use the appropriate primitive wrapper `compare` method, rather than the boxing valueOf along with equals.
The specification of java.lang.Record should consider what parts, if any, should be updated to align itself reasonably with the equality definition in the JLS.
1. Update the JLS to base equality of record classes on the "value of the component field", rather than the value returned by the component accessor.
2. Update the equality of primitives to use the appropriate primitive wrapper `compare` method, rather than the boxing valueOf along with equals.
The specification of java.lang.Record should consider what parts, if any, should be updated to align itself reasonably with the equality definition in the JLS.
Attachments
Issue Links
- backported by
-
JDK-8258363 Clarify what component values are used in Record::equals
- Resolved
- csr for
-
JDK-8257619 Clarify what component values are used in Record::equals
- Closed
- relates to
-
JDK-8256861 Records: Details of implicitly declared equals method has been superseded in implementation
- Resolved