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

[lworld] Javac disallows calls to super.{hashCode(), equals(), toString()} on a primitive instance receiver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Javac implements this restriction that the methods hashCode, equals and toString from jlO cannot be invoked on a primitive object receiver via super.{hashCode, equals, toString} - This was ancient historic behavior and has no meaning anymore - Now a primitive class author is not forbidden from expressly defining these methods and if so desired call super.xxx as part of their implementation (or anywhere else)

      Confirmed with John Rose that this restriction is irregular, unnecessary, & obsolete.



        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sadayapalam Srikanth Adayapalam
              Reporter:
              sadayapalam Srikanth Adayapalam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: