You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/07/31 03:58:16 UTC

[jira] Closed: (HARMONY-960) [classlib][nio]FileChannelImpl.write(ByteBuffer[] buffers, int offset, int length) checks wrong range.

     [ http://issues.apache.org/jira/browse/HARMONY-960?page=all ]

Paulex Yang closed HARMONY-960.
-------------------------------


Verified by Andrew.

> [classlib][nio]FileChannelImpl.write(ByteBuffer[] buffers, int offset, int length) checks wrong range.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-960
>                 URL: http://issues.apache.org/jira/browse/HARMONY-960
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Andrew Zhang
>         Assigned To: Paulex Yang
>         Attachments: nio.diff
>
>
> Hello,
>     FileChannelImpl.write(ByteBuffer[] buffers, int offset, int length) contains a bug. It should write all buffers whose offset is larger than(equals to) the given offset and less than length plus offset. Currently, it uses length instead of length plus offset.
>     It is in line: 628
> write(ByteBuffer[] buffers, int offset, int length){
>    ......
>     for (int i = offset; i < length; i++) // must be " i < length + offset"
>    ......
> }

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