equal
deleted
inserted
replaced
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 } |