harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2725) [classlib][sql] RI throws SerialException when both parameters in SerialBlob.getBytes(long pos, int len) are valid.
Date Fri, 15 Dec 2006 06:14:21 GMT
[classlib][sql] RI throws SerialException when both parameters in SerialBlob.getBytes(long
pos, int len) are valid.
-------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2725
                 URL: http://issues.apache.org/jira/browse/HARMONY-2725
             Project: Harmony
          Issue Type: Bug
          Components: Non-bug differences from RI
            Reporter: Andrew Zhang


RI throws SerialException when both parameters in SerialBlob.getBytes(long pos, int len) are
valid. 
Consider following code:
public void testGetBytesJI1() throws Exception {
        byte[] buf = { 1, 2, 3, 4, 5, 6, 7, 8 };
        SerialBlob serialBlob = new SerialBlob(buf);
        byte [] data = serialBlob.getBytes(2, 1);
        assertEquals(1, data.length);
        assertEquals(2, data[0]);
   }
Harmony passes the test, while RI throws SerialException with message "Invalid arguments:
position cannot be less that 1". As discussed in mailing list, Harmony's behaviour is reasonable,
and it's non bug different from RI. 

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

        

Mime
View raw message