RFR: 8344394: Remove SecurityManager and related calls from java.management.rmi [v2]
Kevin Walls
kevinw at openjdk.org
Mon Nov 25 12:59:19 UTC 2024
On Fri, 22 Nov 2024 22:08:28 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove last import sun.reflect.misc.ReflectUtil
>
> src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java line 1231:
>
>> 1229: return getServerNotifFwd().fetchNotifs(clientSequenceNumber, timeout, maxNotifications);
>> 1230: } else {
>> 1231: return Subject.callAs(subject, () -> getServerNotifFwd().fetchNotifs(clientSequenceNumber, timeout, maxNotifications));
>
> This call may throw CompletionException instead of PrivilegedActionException
> That's strange that this case does not go through standard `doPrivilegedOperation` way.
> I think this class needs to be improved (most likely as a separate PR).
> For most of operations it created "operation id" and creates array of arguments, but then `doOperation` parses the id and arguments and performs required action. It would be much simpler if doPrivilegedOperation/doOperation accept Callable.
Yes thanks, can unwrap CompletionException here like in the other callAs() usage in doPrivilegedOperation().
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22270#discussion_r1856572506
More information about the serviceability-dev
mailing list