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

Naoto Sato naoto at openjdk.java.net
Wed Feb 17 22:27:40 UTC 2021


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

>> Please review this minor specification update to highlight that `File.renameTo(File)` does not modify the `File` instance on which the method is invoked.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   6245663: Mention 'dest' parameter in the added doc

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`?

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

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


More information about the core-libs-dev mailing list