-
Bug
-
Resolution: Fixed
-
P2
-
emb-8u26, 8, 8m, 8u20, 9
-
b08
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045571 | 8u25 | Paul Sandoz | P2 | Resolved | Fixed | b01 |
JDK-8038259 | 8u20 | Paul Sandoz | P2 | Closed | Fixed | b09 |
JDK-8053799 | emb-8u26 | Paul Sandoz | P2 | Resolved | Fixed | b17 |
The new JavaSE8 methods j.u.Arrays.spliterator/stream(X[], int, int) throw IAE instead of the specified AIOOBE when end index is less than start index
For example
http://download.java.net/jdk8/docs/api/java/util/Arrays.html#spliterator-long:A-int-int-
http://download.java.net/jdk8/docs/api/java/util/Arrays.html#stream-double:A-int-int-
Specify
"ArrayIndexOutOfBoundsException - if startInclusive is negative, endExclusive is less than startInclusive, or endExclusive is greater than the array size"
For example this line:
Arrays.spliterator(new int[]{1, 2, 3, 4, 5}, 2, 1);
will throw "java.lang.IllegalArgumentException: origin(2) > fence(1)"
The following tests which were added to JCK8a (and don't exist in JCK8) fail due to this issue:
api/java_util/Arrays/spliterators/index.html#SpliteratorFromSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/spliterators/index.html#SpliteratorFromLongSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/spliterators/index.html#SpliteratorFromIntSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/spliterators/index.html#SpliteratorFromDoubleSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromDoubleSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromIntSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromLongSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromSubArray_Exceptions[endIsLessThanStart]
For example
http://download.java.net/jdk8/docs/api/java/util/Arrays.html#spliterator-long:A-int-int-
http://download.java.net/jdk8/docs/api/java/util/Arrays.html#stream-double:A-int-int-
Specify
"ArrayIndexOutOfBoundsException - if startInclusive is negative, endExclusive is less than startInclusive, or endExclusive is greater than the array size"
For example this line:
Arrays.spliterator(new int[]{1, 2, 3, 4, 5}, 2, 1);
will throw "java.lang.IllegalArgumentException: origin(2) > fence(1)"
The following tests which were added to JCK8a (and don't exist in JCK8) fail due to this issue:
api/java_util/Arrays/spliterators/index.html#SpliteratorFromSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/spliterators/index.html#SpliteratorFromLongSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/spliterators/index.html#SpliteratorFromIntSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/spliterators/index.html#SpliteratorFromDoubleSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromDoubleSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromIntSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromLongSubArray_Exceptions[endIsLessThanStart]
api/java_util/Arrays/streams/index.html#StreamFromSubArray_Exceptions[endIsLessThanStart]
- backported by
-
JDK-8045571 Methods j.u.Arrays.spliterator/stream(X[], int, int) throw IAE instead of specified AIOOBE when endIndex < startIndex
-
- Resolved
-
-
JDK-8053799 Methods j.u.Arrays.spliterator/stream(X[], int, int) throw IAE instead of specified AIOOBE when endIndex < startIndex
-
- Resolved
-
-
JDK-8038259 Methods j.u.Arrays.spliterator/stream(X[], int, int) throw IAE instead of specified AIOOBE when endIndex < startIndex
-
- Closed
-