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

TypeMirror equals is weak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 21
    • core-libs
    • None

      The semantics of hashCode and equals in TypeMirror is weaker than those of Element. In fact, the semantics of hashCode and equals in TypeMirror is as weak (i.e. general) as those of Object.

      Define what it means for a pair of type mirrors to be equal. If it's not possible to improve the equality definition for any type mirror, maybe there are subtypes of TypeMirror for which it is possible?

      It's important to know the equality semantics because otherwise it's unusable. For example, as an API client, I need to know in which circumstances I can collect type mirrors for future querying and retrieval, for example in a set.

            darcy Joe Darcy
            prappo Pavel Rappo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: