-
Bug
-
Resolution: Fixed
-
P2
-
6
-
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.
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.