RFR: 8345286: Remove use of SecurityManager API from misc areas [v2]

Jaikiran Pai jpai at openjdk.org
Mon Dec 2 14:16:03 UTC 2024


On Mon, 2 Dec 2024 14:07:45 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> Is the catch for `UncheckedIOException` due to some previously known failure resulting in the use of these APIs?
>
> Without using `Files.lines()` no `UncheckedIOException` would be thrown. Just `IOException` and `null` returned. This extra catch is there to avoid new `UncheckedIOException` being thrown on `findFirst()`. I.e. to keep semantics the same as before.

Thank you that's a good point. I hadn't taken into account exceptions propagated from `java.util.stream.Stream` operations.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22478#discussion_r1865922009


More information about the core-libs-dev mailing list