Hello!

When a file size is modified via RandomAccessFile.setLength(int) on Windows, it is currently done in three steps:

SetFilePointer(), SetEndOfFile(), SetFilePointerEx().

First two can be combined in one call of SetFileInformationByHandle(), which will make the code shorter and more aligned with Unix variant (ftruncate64 is used on Unix systems, which behaves close to SetFileInformationByHandle(_,FileEndOfFileInfo,_)).

Would you please help review this trivial fix?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8204310
WEBREV: http://cr.openjdk.java.net/~igerasim/8204310/00/webrev/

All the existing tests pass Ok.

--
With kind regards,
Ivan Gerasimov

Reply via email to