RFR: 8344078: Remove security manager dependency in java.nio
Alan Bateman
alanb at openjdk.org
Fri Nov 15 08:43:30 UTC 2024
On Fri, 15 Nov 2024 05:37:43 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Expunge the use of the `SecurityManager`, `AccessController`, and the like from the `java.nio` and `sun.nio` package hierarchies.
src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java line 182:
> 180: return new Iterable<>() {
> 181: public Iterator<Path> iterator() {
> 182: return allowedList.iterator();
The method body can be replaced with `return List.of(rootDirectory);`.
src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java line 286:
> 284: return Collections.emptyList();
> 285: }
> 286: }
The method body can be replaced with `return FileStoreIterator::new;`.
src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 842:
> 840: }
> 841: // The path is relative so need to resolve against default directory,
> 842: // taking care not to reveal the user.dir
Second part of the comment can be removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22132#discussion_r1843383083
PR Review Comment: https://git.openjdk.org/jdk/pull/22132#discussion_r1843386323
PR Review Comment: https://git.openjdk.org/jdk/pull/22132#discussion_r1843379196
More information about the nio-dev
mailing list