RFR: 8293502: (fc) FileChannel::transfer methods fail to copy /proc files on Linux

Brian Burkhalter bpb at openjdk.org
Thu Sep 15 15:43:50 UTC 2022


On Thu, 15 Sep 2022 11:05:42 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Files in `/proc` advertise a size of zero for which direct and mapped transfers do not work. For this case, fall back to arbitrary channel transfer.
>
> test/jdk/java/nio/file/Files/CopyProcFile.java line 52:
> 
>> 50:  */
>> 51: public class CopyProcFile {
>> 52:     static final String SOURCE = "/proc/mounts";
> 
> I wonder how stable this is. If the mount tables change while the test is running then I assume it will fail.

Yes, I thought of that as well. Do you have any suggestion for an alternative?

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

PR: https://git.openjdk.org/jdk/pull/10267


More information about the nio-dev mailing list