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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P4
    • Resolution: Not an Issue
    • 1.3.0
    • None
    • client-libs
    • 2d
    • generic
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: