This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PATCH for java/nio buffers
- From: Michael Koch <konqueror at gmx dot de>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: Per Bothner <per at bothner dot com>, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Fri, 13 Feb 2004 11:02:02 +0100
- Subject: Re: PATCH for java/nio buffers
- References: <402C1489.1070806@bothner.com> <20040213085050.GA26927@mail.konqueror.de>
On Fri, Feb 13, 2004 at 09:50:50AM +0100, Michael Koch wrote:
> > * java/nio/DirectByteBufferImpl.java (owner): New field.
> > (offset): Remove unused field.
> > (<init>): Modify one and add another constructor. Change callers.
> > (allocateDirect): Rename to allocate - direct is implied by context.
>
> No please don't. This violates the behaviour described for
> ByteBuffer.allocate():
>
> "The new buffer's position will be zero, its limit will be its capacity,
> and its mark will be undefined. It will have a backing array, and its
> array offset will be zero."
>
> Direct buffers have no backing array. Sorry to come up so late with
> this. I saw this in the original patch too.
Oh man, this was totally dum from me. We can safely just remove this
method. It should never be called anyway.
Michael