RFR: 8344337: SecurityManager cleanup in java.prefs module [v6]

Iris Clark iris at openjdk.org
Mon Nov 25 21:36:33 UTC 2024


On Mon, 25 Nov 2024 21:02:35 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> We want to `@SuppressWarnings("restricted")` the `loadLibrary()` call. IIUC, I can't `@SuppressWarnings` the static block, nor the call to `loadLibrary()`, so AFAICT that call needs to be in a separate, `@SuppressWarnings`-ed method.
>
> Right. The other option is to put the annotation above the class definition which would cover the entire class, but I think this is better as it makes the annotation specific to that method only.

I agree.  The current location makes more sense given the restriction on static blocks.

Thanks for the explanation!  I knew I had to be missing something.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22252#discussion_r1857363949


More information about the core-libs-dev mailing list