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:
>>
>>http://cr.openjdk.java.net/~alanb/8000330+8002180/webrev/
>
> position0(fd, p) is called even if position didn't change
> (was already the case before).
Agreed.
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.
-Chris.
>
> Also the exception message could be "Negative size"
> for homogeneity with map method.
>
> -Jeff
>
More information about the nio-dev
mailing list