RFR: 8278268 - (ch) InputStream returned by Channels.newInputStream should have fast path for FileChannel targets [v12]

Lance Andersen lancea at openjdk.java.net
Wed Dec 22 17:32:10 UTC 2021


On Wed, 22 Dec 2021 15:41:05 GMT, Markus KARG <duke at openjdk.java.net> wrote:

>> This sub-issue defines the work to be done to implement JDK-8265891 solely for the particular case of FileChannel.transferFrom(ReadableByteChannel), including special treatment of SelectableByteChannel.
>
> Markus KARG has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed: TransferTo2 runs TransferTo
>   
>   Signed-off-by: Markus Karg <markus at headcrashing.eu>

There is additional clean up that can still be done.  There is duplication of some methods and constants between both tests and this could be streamlined to further reduce duplication

I have also attached a diff of  minor cleanup with the tests as they are additional cleanup to the above work.

As Alan mentioned we are seeing failures in approximately 3% of the runs on various windows boxes.  It appears to be an issue with TransferTo.testStreamContents->TransferTo.checkTransferredContents and selectableChannelOutput() as it blocking.   I have not been able to determine the cause. 

[testcleanup-2.patch.txt](https://github.com/openjdk/jdk/files/7764237/testcleanup-2.patch.txt)

-------------

Changes requested by lancea (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6711


More information about the nio-dev mailing list