RFR [8055915]: (ch) FileDispatcherImpl.truncate0 should use SetFileInformationByHandle [win]
Alan Bateman
Alan.Bateman at oracle.com
Mon Aug 25 20:15:26 UTC 2014
On 25/08/2014 15:37, Ivan Gerasimov wrote:
> Hello!
>
> 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 [1].
> 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.
-Alan.
More information about the nio-dev
mailing list