jdk/src/share/classes/java/util/Spliterators.java
changeset 23572 0b4b0e183619
parent 20183 584504d38d79
equal deleted inserted replaced
23571:2be40cc450b5 23572:0b4b0e183619
   382      * the end index, if the start index is negative, or the end index is
   382      * the end index, if the start index is negative, or the end index is
   383      * greater than the array length
   383      * greater than the array length
   384      */
   384      */
   385     private static void checkFromToBounds(int arrayLength, int origin, int fence) {
   385     private static void checkFromToBounds(int arrayLength, int origin, int fence) {
   386         if (origin > fence) {
   386         if (origin > fence) {
   387             throw new IllegalArgumentException(
   387             throw new ArrayIndexOutOfBoundsException(
   388                     "origin(" + origin + ") > fence(" + fence + ")");
   388                     "origin(" + origin + ") > fence(" + fence + ")");
   389         }
   389         }
   390         if (origin < 0) {
   390         if (origin < 0) {
   391             throw new ArrayIndexOutOfBoundsException(origin);
   391             throw new ArrayIndexOutOfBoundsException(origin);
   392         }
   392         }