RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v6]

Alan Bateman alanb at openjdk.org
Sat Sep 14 06:50:07 UTC 2024


On Fri, 13 Sep 2024 22:05:40 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and `isHidden` behave when the `File` represents a symbolic link.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8339574: Move symbolic link verbiage from class to constructor doc in FIS/FOS/RAF

src/java.base/share/classes/java/io/FileInputStream.java line 90:

> 88:      * in the file system.  {@linkplain java.nio.file##links Symbolic links}
> 89:      * are automatically redirected to the <i>target</i> of the link.
> 90:      * A new {@code FileDescriptor}

In passing (and not for this PR) is that we should probably change the first sentence to say that it opens an existing file and drop the use of "connection".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20878#discussion_r1759682290


More information about the core-libs-dev mailing list