RFR: 6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance [v2]

Alan Bateman alanb at openjdk.java.net
Thu Feb 18 09:26:39 UTC 2021


On Wed, 17 Feb 2021 22:28:11 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/share/classes/java/io/File.java line 1381:
>> 
>>> 1379:      * that the rename operation was successful.  As instances of {@code File}
>>> 1380:      * are immutable, the abstract pathname represented by this {@code File}
>>> 1381:      * object does not itself change although the filesystem object it denoted
>> 
>> I guess you meant `file` object here, instead of `filesystem`?
>
> No, I intended `filesystem` but in the sense of "object in the filesystem" but it does seem awkward.

It might be clearer if the end of the sentence were changed to something like "... this File object is not changed to name destination file or directory".

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

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


More information about the core-libs-dev mailing list