RFR: 8344077: Remove security manager dependency in java.io [v3]

Alan Bateman alanb at openjdk.org
Tue Nov 19 08:01:53 UTC 2024


On Mon, 18 Nov 2024 21:56:12 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Expunge the use of the `SecurityManager`, `AccessController`, and the like from the `java.io` package.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8344446: Revert spurious inclusion of SCTP changes

Looks fine, just re-check the FIS/FOS constructors as original check file==null was for the SM usage.

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

> 134:         if (name == null) {
> 135:             throw new NullPointerException();
> 136:         }

I assume (old) L133-139 can be replaced with `String name = file.getPath()`, the explicit check that name is null goes away with the SM check.

src/java.base/share/classes/java/io/FileOutputStream.java line 205:

> 203:         if (name == null) {
> 204:             throw new NullPointerException();
> 205:         }

Same comment as the FOS constructor.

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

PR Review: https://git.openjdk.org/jdk/pull/22219#pullrequestreview-2444622317
PR Review Comment: https://git.openjdk.org/jdk/pull/22219#discussion_r1847840569
PR Review Comment: https://git.openjdk.org/jdk/pull/22219#discussion_r1847840985


More information about the core-libs-dev mailing list