8000330: (fc) FileChannel.truncate issues when given size > file size

Chris Hegarty chris.hegarty at oracle.com
Sun Nov 4 00:52:49 PDT 2012

On 11/03/2012 10:09 PM, Jeff Hain wrote:
>>The webrev with the proposed changes is here:
> position0(fd, p) is called even if position didn't change
> (was already the case before).


I think it is deliberate on your part, but if there is a concern about 
maintaining existing behavior, you could move the size check after the 
writable check.

Otherwise looks fine.


> Also the exception message could be "Negative size"
> for homogeneity with map method.
> -Jeff

More information about the nio-dev mailing list