On Fri, 14 Jun 2024 12:03:07 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> Kevin Walls has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Separate SM allowed and not allowed cases > > src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java > line 1461: > >> 1459: throw rte; >> 1460: } else { >> 1461: throw new PrivilegedActionException(e); > > The 4 lines above seems unnecessary now. Plus, do not wrap > `PrivilegedActionException` inside `PrivilegedActionException`. It needs to recognise and throw RuntimeException so that a SecurityException isn't wrapped in a PrivilegedActionException (which gets caught by those blocks of code which call extractException(pe) and look at what Exception it contains). (test/jdk/javax/management/remote/mandatory/notif/NotificationAccessControllerTest.java tests this) I can add a check to make sure PrivilgedActionException doesn't get wrapped. Daniel I think mentioned this also. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19624#discussion_r1639876260