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

com.sun.tools.javac.util.List.equals() violates java.util.List.equals() contract

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • tools
    • b92
    • generic
    • generic
    • Verified

      The documentation for java.util.List.equals() states that:

         Returns true if and only if the specified object is also a list, both
         lists have the same size, and all corresponding pairs of elements in
         the two lists are equal. ... In other words, two lists are defined to be
         equal if they contain the same elements in the same order. This
         definition ensures that the equals method works properly across
         different implementations of the List interface.

      com.sun.tools.javac.util.List.equals(Object) violates this contract by first checking that the Object's type is com.sun.tools.javac.util.List, and then calling a static method which assumes the same.

            jjg Jonathan Gibbons
            tballsunw Tom Ball (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: