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

CopyOnWriteArraySet.iterator should explicitly say it uses list order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • core-libs

      Doug Lea writes:

      >Also, does CopyOnWriteArraySet guarantee order like LinkedHashSet? If
      >> so, I don't think it's documented. I think it should be documented
      >> either way, because it's ambiguous because the docs say it's based on
      >> CopyOnWriteArrayList, which guarantees order as a List.


      Thanks. You are right that it should explicitly say that it uses list
      order; it is now only implicit.

      Josh and Martin:

      Any objections to overriding CopyOnWriteArraySet.iterator
      javadoc, that now just inherits:
        Returns an iterator over the elements contained in this collection.
      To instead say:
        Returns an iterator over the elements contained in this collection
        in the order in which these elements were added.
      ###@###.### 2004-11-09 00:22:05 GMT

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: