RFR [jdk7u-dev] : 8064407, 8068507 : (fc) FileChannel transferTo should use TransmitFile on Windows

Alan Bateman Alan.Bateman at oracle.com
Thu Jan 8 07:18:48 UTC 2015


On 07/01/2015 14:54, Seán Coffey wrote:
> I've ported the FileChannel transferTo change back to the jdk7u-dev 
> codebase. One or two minor changes :
>
> jdk7u uses Util.load() in the static initializer block of 
> windows/classes/sun/nio/ch/FileDispatcherImpl.java - I've kept that 
> there in JDK 7u. JDK-8022594 changed logic there in JDK 8 and later.
>
> Importing the Mswsock.h library caused a compilation failure [1] for 
> JDK 7u (still using the win2003/xp compile platform)  - It's like the 
> winsock2 header values needed to be imported first. Doing that fixed 
> the issue. I'm not sure why I don't see that in jdk8u compilation.
>
> I've also renamed the new system property to 
> jdk.nio.enableFastFileTransfer and will make a similar change in 
> jdk8u-dev and jdk9. CCC has been approved for that change to happen.
>
> Added the bug IDs to the @bug tag in testcase also.
>
> webrev : 
> http://cr.openjdk.java.net/~coffeys/webrev.8064407.8068507.jdk7u/webrev/
I've looked through the backport and it looks good to me. I can't 
explain the issue with the ordering of the #includes but it does sound 
like an issue with the older SDK. It would great to run all the :jdk_nio 
tests with -vmoption:-Djdk.nio.enableFastTransfer so that the new code 
gets exercised.

Also thanks for taking the issue to rename the property, I assume that 
will need to go into jdk9/dev and jdk8u-dev.

-Alan


More information about the nio-dev mailing list