This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH for java/nio buffers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]