RFR: 8356493: (fs) SecureDirectoryStream missing some capabilities [v2]
Brian Burkhalter
bpb at openjdk.org
Tue Sep 2 18:40:23 UTC 2025
On Sat, 30 Aug 2025 14:19:01 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8356493: Path -> T for parameters and return values
>
> src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 141:
>
>> 139: * Creates a new and empty file, failing if the file already exists.
>> 140: *
>> 141: * <p>This method works in a similar manner to {@linkplain Files#createFile
>
> I think this method can use "This method works in exactly the manner specified".
Fixed in b59c3f6.
> src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 171:
>
>> 169: * @since 26
>> 170: */
>> 171: Path createFile(Path path, FileAttribute<?>... attrs)
>
> I assume the parameter should be of type T (same comment on the other methods)
Fixed in b59c3f6.
> src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 250:
>
>> 248: */
>> 249: Path createLink(T link, SecureDirectoryStream<T> targetdir, T existing)
>> 250: throws IOException;
>
> I realize this models a pair of dfd/path tuples and mklinkat but I wonder about the usability and whether we really need this. In other, maybe we should drop this method from the proposal for now.
Could do, but left in for the moment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26950#discussion_r2316869150
PR Review Comment: https://git.openjdk.org/jdk/pull/26950#discussion_r2316869283
PR Review Comment: https://git.openjdk.org/jdk/pull/26950#discussion_r2316869517
More information about the nio-dev
mailing list