You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2007/05/31 13:13:16 UTC

[jira] Closed: (HARMONY-3335) [classlib][sql] SerialClob.setString(long, String) should not throw ArrrayIndexOutOfBoundsException

     [ https://issues.apache.org/jira/browse/HARMONY-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-3335.
--------------------------------

    Resolution: Won't Fix

> [classlib][sql] SerialClob.setString(long, String) should not throw ArrrayIndexOutOfBoundsException
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3335
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3335
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib, Non-bug differences from RI
>            Reporter: Andrew Zhang
>            Priority: Minor
>
> 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 {
>             serialClob.setString(2, "hello");
>             fail("should throw SerialException");
>         } catch (SerialException e) {
>             // expected
>         } 
> }
> As discussed in dev mailing list, Harmony will comply with spec, and won't follow RI for this case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.