A DESCRIPTION OF THE PROBLEM :
Both classes sun.awt.util.IdentityArrayList and sun.awt.util.IdentityLinkedList are based on object identity, as the name implies. The documentation was maybe copied & pasted from another list type and for some methods talks about being based on object equality (mentioning 'equals()').
Correct Javadoc descriptions can be seen for:
sun.awt.util.IdentityLinkedList#indexOf
sun.awt.util.IdentityLinkedList#lastIndexOf
sun.awt.util.IdentityLinkedList#remove(java.lang.Object)
Incorrect Javadoc descriptions can be seen for:
sun.awt.util.IdentityLinkedList#contains
sun.awt.util.IdentityArrayList#contains
sun.awt.util.IdentityArrayList#indexOf
sun.awt.util.IdentityArrayList#lastIndexOf
sun.awt.util.IdentityArrayList#remove(java.lang.Object)
So it looks like someone did 75% of the job right in class IdentityLinkedList but then for some did not finish the task. The same person completely forgot to update the Javadoc of IdentityArrayList.
Both classes sun.awt.util.IdentityArrayList and sun.awt.util.IdentityLinkedList are based on object identity, as the name implies. The documentation was maybe copied & pasted from another list type and for some methods talks about being based on object equality (mentioning 'equals()').
Correct Javadoc descriptions can be seen for:
sun.awt.util.IdentityLinkedList#indexOf
sun.awt.util.IdentityLinkedList#lastIndexOf
sun.awt.util.IdentityLinkedList#remove(java.lang.Object)
Incorrect Javadoc descriptions can be seen for:
sun.awt.util.IdentityLinkedList#contains
sun.awt.util.IdentityArrayList#contains
sun.awt.util.IdentityArrayList#indexOf
sun.awt.util.IdentityArrayList#lastIndexOf
sun.awt.util.IdentityArrayList#remove(java.lang.Object)
So it looks like someone did 75% of the job right in class IdentityLinkedList but then for some did not finish the task. The same person completely forgot to update the Javadoc of IdentityArrayList.