classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] gnu/java/nio/channels/FileChannelImpl.java: move positi


From: Michael Koch
Subject: Re: [cp-patches] gnu/java/nio/channels/FileChannelImpl.java: move position forward
Date: Thu, 27 Jan 2005 19:15:58 +0100
User-agent: KMail/1.7.1

Am Mittwoch, 12. Januar 2005 16:31 schrieb Ito Kazumitsu:
> Hi,
>
> I suggest the following patch, which fixes a bug: the position of
> the source buffer does not get updated after the bytes have been
> written.
>
> ChangeLog Entry:
>
> 2005-01-12  Ito Kazumitsu  <address@hidden>
>
>  * gnu/java/nio/channels/FileChannelImpl.java
>  (write(ByteBuffer)):
>  Move the position of the source buffer forward.
>
> ###############
> --- gnu/java/nio/channels/FileChannelImpl.java.orig Mon May 10
> 00:16:27 2004 +++ gnu/java/nio/channels/FileChannelImpl.java Thu
> Jan 13 00:14:52 2005 @@ -191,6 +191,7 @@
>        {
>   byte[] buffer = src.array();
>   write(buffer, src.arrayOffset() + src.position(), len);
> + src.position(src.position() + len);
>        }
>      else
>        {
> ###############

Do you have a testcase for this ? best would be a mauve testcase ?


Michael
-- 
Homepage: http://www.worldforge.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]