RFR: 8366102: Clarification Needed: Symbolic Link Handling in File API Specifications [v2]
Alan Bateman
alanb at openjdk.org
Sat Aug 30 07:02:48 UTC 2025
On Fri, 29 Aug 2025 16:27:35 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Attempt to improve the verbiage of the `java.io.File` specification to make it clearer whether a given method operates only on an abstract pathname or on the actual file system entry it denotes.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8366102: Update class-level spec, compareTo, and equals
The updates to compareTo and equals are good.
The only thing I'm wondering about is the addition of "denoted by". The class description uses "represented by". In the interop section we have (since JDK 7) "represented by a File object to locate a file" which I think is clear. So a suggestion, mull over it, is to have the methods that access the file system use "the file located by this abstract pathname" and see how it fits with the other text.
src/java.base/share/classes/java/io/File.java line 88:
> 86: * Unless otherwise specified, symbolic links are transparent to applications
> 87: * and operations on files that are symbolic links are automatically redirected
> 88: * to the target of the link. Methods that only operate on the abstract pathnam
Thanks, I think this paragraph is good now, just a typo in "pathnam" at the end.
-------------
PR Review: https://git.openjdk.org/jdk/pull/27006#pullrequestreview-3170913949
PR Review Comment: https://git.openjdk.org/jdk/pull/27006#discussion_r2311819242
More information about the core-libs-dev
mailing list