Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8257598

Clarify what component values are used in Record::equals

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b29

      Backports

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                vromero Vicente Arturo Romero Zaldivar
                Reporter:
                chegar Chris Hegarty
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: