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

Clarify what component values are used in Record::equals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 16
    • 16
    • core-libs
    • b29

        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.

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

                Created:
                Updated:
                Resolved: