Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
As spec says, SerialClob.setString(long, String) throws SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer. But following code throws ArrayIndexOutOfBoundException instead.
public void test() {
String s = "hello";
char[] buf = s.toCharArray();
SerialClob serialClob = new SerialClob(buf);
try
catch (SerialException e)
{ // expected }
}
As discussed in dev mailing list, Harmony will comply with spec, and won't follow RI for this case.