harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-3335) [classlib][sql] SerialClob.setString(long, String) should not throw ArrrayIndexOutOfBoundsException
Date Thu, 31 May 2007 11:13:16 GMT

     [ 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.


Mime
View raw message