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

java.awt.geom.Area violates Object.hashCode contract

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • CPU:
      generic
    • OS:
      solaris_2.6

      Description

      java.awt.geom.Area class overrides Object.equals but not Object.hashCode. This violates the restriction that:

      a.equals(b) ==> a.hashCode()==b.hashCode()

      If our customers use objects of any of these classes as keys in Hashtables or
      HashMaps, or elements in HashSets, the basic invariants of the collections will
      be corrupted, leading to erratic behavior.

      We have fixed this problem for awt (see bug 4157612)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tdv Dmitri Trembovetski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: