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

PropertyMapWrapper.equals should compare className

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b70
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        PropertyMapWrapper is a class that implements equals and hashCode on property maps to allow for reuse of maps. It currently just compares properties, but not the owning object's class. If a property map is used with different owner classes accessing any field property will result in a ClassCastException.

        I noticed this while working on JDK-8077149, but the code that triggers the ClassCastException will not be part of the fix so I'm filing a separate bug.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hannesw Hannes Wallnoefer
                  Reporter:
                  hannesw Hannes Wallnoefer
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: