Skip to content

Commit d3e7b0c

Browse files
author
Viktor Klang
committed
8336462: ConcurrentSkipListSet Javadoc incorrectly warns about size method complexity
Reviewed-by: jpai
1 parent be34730 commit d3e7b0c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java

+3-8
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,9 @@ public ConcurrentSkipListSet<E> clone() {
189189
* contains more than {@code Integer.MAX_VALUE} elements, it
190190
* returns {@code Integer.MAX_VALUE}.
191191
*
192-
* <p>Beware that, unlike in most collections, this method is
193-
* <em>NOT</em> a constant-time operation. Because of the
194-
* asynchronous nature of these sets, determining the current
195-
* number of elements requires traversing them all to count them.
196-
* Additionally, it is possible for the size to change during
197-
* execution of this method, in which case the returned result
198-
* will be inaccurate. Thus, this method is typically not very
199-
* useful in concurrent applications.
192+
* <p>It is possible for the size to change during execution of this method,
193+
* in which case the returned result will be inaccurate.
194+
* Thus, this method is typically not very useful in concurrent applications.
200195
*
201196
* @return the number of elements in this set
202197
*/

0 commit comments

Comments
 (0)