-
Bug
-
Resolution: Fixed
-
P3
-
1.1, 8
Spec to BufferedWriter.write(String, int, int) says:
"If the value of the len parameter is negative then no characters are written. This is contrary to the specification of this method in the superclass, which requires that an IndexOutOfBoundsException be thrown."
But it says nothing about other cases when IndexOutOfBoundsException will be thrown: if off is negative, or len is negative, or off+len is negative or greater than the length of the given string - including Throws part where IndexOutOfBoundsException is not mentioned.
"If the value of the len parameter is negative then no characters are written. This is contrary to the specification of this method in the superclass, which requires that an IndexOutOfBoundsException be thrown."
But it says nothing about other cases when IndexOutOfBoundsException will be thrown: if off is negative, or len is negative, or off+len is negative or greater than the length of the given string - including Throws part where IndexOutOfBoundsException is not mentioned.
- relates to
-
JDK-8130679 Writer/StringWriter.write methods do not specify index out bounds
-
- Closed
-