Name: bb33257 Date: 06/28/98
It would expect an IndexOutOfBoundsException when I call StringWriter
with a string and out of bounds parameters, as below.
No exception is thrown in this case.
-----------------------------
import java.io.*;
public class SWWrite {
public static void main(String[] args) throws IOException {
int result;
String str = "abcefgh";
StringWriter sw = new StringWriter();
sw.write(str, 5, 5);
}//end of main
======================================================================
- duplicates
-
JDK-4127657 read(byte[], int, int) in xxxReader can throw undocumented exceptions
-
- Closed
-