You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Zhang (JIRA)" <ji...@apache.org> on 2006/12/15 04:46:21 UTC
[jira] Created: (HARMONY-2723) [classlib][sql] RI returns positive
value when SerialBlob.position (byte[] pattern, long start) can't find the
pattern.
[classlib][sql] RI returns positive value when SerialBlob.position (byte[] pattern, long start) can't find the pattern.
-----------------------------------------------------------------------------------------------------------------------
Key: HARMONY-2723
URL: http://issues.apache.org/jira/browse/HARMONY-2723
Project: Harmony
Issue Type: Bug
Components: Non-bug differences from RI
Reporter: Andrew Zhang
RI's behaviour of SerialBlob.postion(byte[] pattern, long start) looks strange. Consider following code:
private void testPosition_BytePattern()
throws SerialException, SQLException {
byte[] buf = { 1, 2, 3, 4, 5, 6, 7, 8 };
SerialBlob blob = new SerialBlob(buf);
byte[] pattern = new byte[] { 2, 4 };
long pos = blob.position(pattern, 1);
System.out.println("pos = " + pos);
// FIXME: RI's bug?
assertEquals(-1, pos);
}
RI's output:
pos = 3
Harmony's output:
pos = -1
As discussed in the mailing list, we'd regard it as a bug of RI. And the implementation of Harmony looks reasonable. 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
[jira] Closed: (HARMONY-2723) [classlib][sql] RI returns positive
value when SerialBlob.position (byte[] pattern, long start) can't find the
pattern.
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison closed HARMONY-2723.
--------------------------------
Resolution: Won't Fix
> [classlib][sql] RI returns positive value when SerialBlob.position (byte[] pattern, long start) can't find the pattern.
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2723
> URL: https://issues.apache.org/jira/browse/HARMONY-2723
> Project: Harmony
> Issue Type: Bug
> Components: Non-bug differences from RI
> Reporter: Andrew Zhang
>
> RI's behaviour of SerialBlob.postion(byte[] pattern, long start) looks strange. Consider following code:
> private void testPosition_BytePattern()
> throws SerialException, SQLException {
> byte[] buf = { 1, 2, 3, 4, 5, 6, 7, 8 };
> SerialBlob blob = new SerialBlob(buf);
> byte[] pattern = new byte[] { 2, 4 };
> long pos = blob.position(pattern, 1);
> System.out.println("pos = " + pos);
> // FIXME: RI's bug?
> assertEquals(-1, pos);
> }
> RI's output:
> pos = 3
> Harmony's output:
> pos = -1
> As discussed in the mailing list, we'd regard it as a bug of RI. And the implementation of Harmony looks reasonable. Thanks!
> Best regards,
> Andrew
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.