On Fri, 14 Jun 2024 15:26:54 GMT, Kevin Walls <kev...@openjdk.org> wrote:

>> JMX uses APIs related to the Security Mananger which are deprecated.  Use of 
>> AccessControlContext will be removed when Security Manager is removed.
>> 
>> Until then, updates are needed to not require setting  
>> -Djava.security.manager=allow to use JMX authentication.
>
> Kevin Walls has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Unnecessary catches to remove

src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java
 line 1437:

> 1435:                     } catch (Exception e) {
> 1436:                         if (e instanceof RuntimeException)
> 1437:                            throw (RuntimeException) e;

Suggestion:

                        if (e instanceof RuntimeException rte)
                           throw rte;

src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java
 line 1450:

> 1448:                     } catch (Exception e) {
> 1449:                         if (e instanceof RuntimeException)
> 1450:                            throw (RuntimeException) e;

Suggestion:

                        if (e instanceof RuntimeException rte)
                           throw rte;

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19624#discussion_r1640033632
PR Review Comment: https://git.openjdk.org/jdk/pull/19624#discussion_r1640034429

Reply via email to