Details
-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b112
-
Verified
Description
The current specs for the basic collections classes:
http://download.java.net/jdk8/docs/api/java/util/List.html#spliterator%28%29
http://download.java.net/jdk8/docs/api/java/util/Collection.html#spliterator%28%29
http://download.java.net/jdk8/docs/api/java/util/Set.html#spliterator%28%29
look like requiring all the subclasses to return SIZED spliterators while this may not be feasible or reasonable or make sense.
For example:
http://download.java.net/jdk8/docs/api/java/util/concurrent/ConcurrentSkipListMap.html#entrySet%28%29
may look as SIZED characteristic still should be present while it is not so.
----------------
Another case - collection views of WeakHashMap don't report SIZED; consider the following code
System.out.println( new Hashtable().entrySet().spliterator().hasCharacteristics(Spliterator.SIZED));
System.out.println( new HashMap().entrySet().spliterator().hasCharacteristics(Spliterator.SIZED));
System.out.println( new WeakHashMap().entrySet().spliterator().hasCharacteristics(Spliterator.SIZED));
which will print out
true
true
false
The following JCK tests fail due to this case:
api/java_util/WeakHashMap/EntrySetSpliterator.html#EntrySetSpliterator[characteristics_SIZED]
api/java_util/WeakHashMap/EntrySetSpliterator.html#EntrySetSpliterator[hasCharacteristics_SIZED]
api/java_util/WeakHashMap/KeySetSpliterator.html#KeySetSpliterator[characteristics_SIZED]
api/java_util/WeakHashMap/KeySetSpliterator.html#KeySetSpliterator[hasCharacteristics_SIZED]
api/java_util/WeakHashMap/ValuesSpliterator.html#ValuesSpliterator[characteristics_SIZED]
api/java_util/WeakHashMap/ValuesSpliterator.html#ValuesSpliterator[hasCharacteristics_SIZED]
http://download.java.net/jdk8/docs/api/java/util/List.html#spliterator%28%29
http://download.java.net/jdk8/docs/api/java/util/Collection.html#spliterator%28%29
http://download.java.net/jdk8/docs/api/java/util/Set.html#spliterator%28%29
look like requiring all the subclasses to return SIZED spliterators while this may not be feasible or reasonable or make sense.
For example:
http://download.java.net/jdk8/docs/api/java/util/concurrent/ConcurrentSkipListMap.html#entrySet%28%29
may look as SIZED characteristic still should be present while it is not so.
----------------
Another case - collection views of WeakHashMap don't report SIZED; consider the following code
System.out.println( new Hashtable().entrySet().spliterator().hasCharacteristics(Spliterator.SIZED));
System.out.println( new HashMap().entrySet().spliterator().hasCharacteristics(Spliterator.SIZED));
System.out.println( new WeakHashMap().entrySet().spliterator().hasCharacteristics(Spliterator.SIZED));
which will print out
true
true
false
The following JCK tests fail due to this case:
api/java_util/WeakHashMap/EntrySetSpliterator.html#EntrySetSpliterator[characteristics_SIZED]
api/java_util/WeakHashMap/EntrySetSpliterator.html#EntrySetSpliterator[hasCharacteristics_SIZED]
api/java_util/WeakHashMap/KeySetSpliterator.html#KeySetSpliterator[characteristics_SIZED]
api/java_util/WeakHashMap/KeySetSpliterator.html#KeySetSpliterator[hasCharacteristics_SIZED]
api/java_util/WeakHashMap/ValuesSpliterator.html#ValuesSpliterator[characteristics_SIZED]
api/java_util/WeakHashMap/ValuesSpliterator.html#ValuesSpliterator[hasCharacteristics_SIZED]
Attachments
Issue Links
- duplicates
-
JDK-8024482 Spliterator releted tests hasCharacteristics_SIZED failed
- Resolved