RFR: 8293121: (fs) Refactor UnixFileSystem copying into generic Unix, Linux, and BSD implementations [v3]

Brian Burkhalter bpb at openjdk.org
Thu Sep 1 16:16:35 UTC 2022


On Thu, 1 Sep 2022 14:50:59 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/linux/classes/sun/nio/fs/LinuxFileSystem.java line 138:
>> 
>>> 136: 
>>> 137:     @Override
>>> 138:     protected void bufferedCopy(int dst, int src, long address,
>> 
>> Everything is in sun.nio.fs and the existing methods aren't protected. I don't mind if we have the protected methods but it's a bit inconsistent to have it on some but not all of the methods that are intended to be used by subclasses.
>
> I was thinking that `protected` would suggest that the method should likely be overridden.

Removed `protected` in b6cb94901d1bbaa34917a5aaf381ecf700282c54.

>> test/jdk/java/nio/file/Files/CopyAndMove.java line 25:
>> 
>>> 23: 
>>> 24: /* @test
>>> 25:  * @bug 4313887 6838333 6917021 7006126 6950237 8006645 8201407 8293121 8267820
>> 
>> Did you mean to include this test update in this PR?
>
> I was thinking of the coverage but as this really adds a CoW file system if available then I think it better to leave it in the other PR about cloning on Linux.

Removed in b6cb94901d1bbaa34917a5aaf381ecf700282c54.

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

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


More information about the nio-dev mailing list