Javadoc for ConcurrentSkipListSet.add(E e) is wrong

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      The Javadoc for ConcurrentSkipListSet's add(E e) method states that the method "adds the specified element e to this set if the set contains no element e2 such that e.equals(e2)". This is not true, since it actually determines equality using natural ordering (i.e. a Comparable's compareTo method), unless a custom comparator is defined. This can lead to elements not being added because they were unexpectedly determined to be equal to another element.


            Assignee:
            Nizar Benalla
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: