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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • tools
    • generic
    • generic

      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.



            sadayapalam Srikanth Adayapalam (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: