On Wed, 12 Jun 2024 16:41:36 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> Kevin Walls has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>    Undo test policy updates
>
> src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java
>  line 1445:
> 
>> 1443:             } else {
>> 1444:                 throw new PrivilegedActionException(e);
>> 1445:             }
> 
> I assume there no chance that `Exception e` may already be a 
> `PrivilegedActionException` here. You coud avoid casts by using instanceof 
> patterns.
> 
> Suggestion:
> 
>             if (e instanceof RuntimeException rte) {
>                 throw  rte;
>             } else {
>                 throw new PrivilegedActionException(e);
>             }

ok yes will do that.  SecurityException was another carryover from before 
simplifying the updated calls, think it's no longer needed.

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

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

Reply via email to