RFR: 8344066: Remove SecurityManager uses from the jdk.accessibility module
Abhishek Kumar
abhiscxk at openjdk.org
Thu Nov 21 15:33:15 UTC 2024
On Thu, 21 Nov 2024 00:25:18 GMT, Phil Race <prr at openjdk.org> wrote:
> What about the 52 (?) uses of SecurityException in these files ? eg AWTEventMonitor.java: } catch (SecurityException e) { SwingEventMonitor.java: } catch (SecurityException e) {
>
> The question is, what code would throw that exception ? If it is not possible any more, these are no longer needed. If it IS possible, then they are still needed.
As per the spec of `Class.getMethod()`, it can throw `SecurityException` if **SecurityManager is present**. Since SM won't be enabled as per [JEP 486](https://bugs.openjdk.org/browse/JDK-8338625), it seems unlikely that `SecurityException` will be thrown and is no longer needed. Hence removed from jdk.accessibility module.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22267#issuecomment-2491548481
More information about the client-libs-dev
mailing list