On Mon, 25 Nov 2024 21:02:35 GMT, Sean Mullan <[email protected]> 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