[PATCH] java.nio/6593946 ByteBuffer.compact does not clear mark

Alan Bateman Alan.Bateman at Sun.COM
Thu Oct 4 08:40:10 UTC 2007

Keith Seitz wrote:
> Hi,
> The attached patch should fix the mark problem with 
> ByteBuffer.compact, which simply was not following the API specification.
> I'm also attaching a simple jtreg testcase for this.
> Keith
Keith - I think Iris is going to get back to you shortly on this. One 
thing that needs to be figured out here is the implication for any 
existing applications that might depend on the current (broken) 
behavior. Unfortunately we have to worry about such things. In this 
case, if there is existing code that (perhaps unknowingly) depends on 
the current behavior then we might break it by a reset throwing an 
invalid mark exception in cases where it isn't thrown today. In the past 
we've had to introduce system properties to allow for "bug 
compatibility" with previous releases. I'm not saying we need it here 
but we need to think about it.


More information about the core-libs-dev mailing list