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 2006/12/22 14:04:23 UTC
[jira] Closed: (HARMONY-2836) [classlib][sql] RI's
SerialBlob.setBytes throws ArrayIndexOutOfBoundsException when array index
parameters are invalid.
[ http://issues.apache.org/jira/browse/HARMONY-2836?page=all ]
Tim Ellison closed HARMONY-2836.
--------------------------------
Resolution: Fixed
Acknowleged as a non-bug difference.
> [classlib][sql] RI's SerialBlob.setBytes throws ArrayIndexOutOfBoundsException when array index parameters are invalid.
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2836
> URL: http://issues.apache.org/jira/browse/HARMONY-2836
> Project: Harmony
> Issue Type: Bug
> Components: Non-bug differences from RI
> Reporter: Andrew Zhang
>
> As discussed in the mailing list, it's more reasonable to throw SerialException instead. Consider following code:
> public void testSetBytes() throws Exception {
> byte[] buf = { 1, 2, 3, 4, 5, 6, 7, 8 };
> byte[] theBytes = { 9, 9, 9 };
> SerialBlob serialBlob = new SerialBlob(buf);
> serialBlob.setBytes (7, theBytes); // ArrayIndexOutOfBoundsException
> serialBlob.setBytes(7, theBytes, 0, 3); // ArrayIndexOutOfBoundsException
> serialBlob.setBytes(7, theBytes, 0, 10); // SerialException
> }
> RI throws ArrayIndexOutOfBoundsException, but according to spec and consistency, it's better throw SerialException.
> Harmony won't follow RI's behaviour for this issue. For Harmony implementation details, please refer to Harmony-2835.
> The tests are also included in Harmony-2835. Thanks!
> Best regards,
> Andrew
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira