A DESCRIPTION OF THE PROBLEM :
The javadoc for the family of methods named copyOfRange () of the class java.util.Arrays declares that the method:
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length()
This should read:
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length
since an array length is a (synthetic) field, not a method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length
ACTUAL -
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length()
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#copyOfRange(double[],%20int,%20int)
The javadoc for the family of methods named copyOfRange () of the class java.util.Arrays declares that the method:
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length()
This should read:
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length
since an array length is a (synthetic) field, not a method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length
ACTUAL -
Throws:
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length()
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#copyOfRange(double[],%20int,%20int)