RFR : (ch) FileDispatcherImpl.truncate0 should use SetFileInformationByHandle [win]
Alan.Bateman at oracle.com
Mon Aug 25 20:15:26 UTC 2014
On 25/08/2014 15:37, Ivan Gerasimov wrote:
> It is a proposal to reimplement FileDispatcherImpl.truncate0 with a
> single call to SetFileInformationByHandle().
> The later is available on Windows starting with Vista & Server 2008 .
> The code should be buildable on XP & Server 2003.
> The existing test java/nio/channels/AsynchronousFileChannel/Basic.java
> was used to verify the functionality isn't broken.
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8055915
> WEBREV: http://cr.openjdk.java.net/~igerasim/8055915/0/webrev/
I think this okay although I think I think a reminder about the size of
LARGE_INTEGER to be confident that the conversion from jlong is correct.
AsynchronousFileChannel/Basic.java just happens to exercise it so I
won't update it's @bug. Best to run the :jdk_nio tests on Windows 32-bit
and 64-bit to check the change.
More information about the nio-dev