RFR: 8300864: Declare some fields in java.io as final

Alan Bateman alanb at openjdk.org
Mon Jan 23 18:02:39 UTC 2023


On Mon, 23 Jan 2023 14:24:16 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> Some of the fields in java.io can be declared as final.

src/java.base/share/classes/java/io/File.java line 155:

> 153:      * The FileSystem object representing the platform's local file system.
> 154:      */
> 155:     private static final FileSystem FS = DefaultFileSystem.getFileSystem();

It's a pity to rename this one as FS.* is very ugly.

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

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


More information about the core-libs-dev mailing list