8000330: (fc) FileChannel.truncate issues when given size (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Sun Nov 4 02:57:28 PST 2012
- Previous message: 8000330: (fc) FileChannel.truncate issues when given size > file size
- Next message: Review Request - JDK-6720349: (ch) Channels tests depending on hosts inside Sun
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 03/11/2012 22:09, Jeff Hain wrote:
>The webrev with the proposed changes is here: > >http://cr.openjdk.java.net/~alanb/8000330+8002180/webrev/ <http://cr.openjdk.java.net/%7Ealanb/8000330+8002180/webrev/>
position0(fd, p) is called even if position didn't change (was already the case before). This is necessary because truncating the file can change the position, Windows in particular. It could re-factored to deal with platform specific behavior or the platform implementations could be changed to reset the position but it hardly seems worth it.
Also the exception message could be "Negative size" for homogeneity with map method. This make sense - thanks.
-Alan. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121104/d1624693/attachment.html
- Previous message: 8000330: (fc) FileChannel.truncate issues when given size > file size
- Next message: Review Request - JDK-6720349: (ch) Channels tests depending on hosts inside Sun
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]