jmx-dev RFR: 8348265: RMIConnectionImpl: Remove Subject.callAs on MarshalledObject

Roger Riggs rriggs at openjdk.org
Thu Jan 23 14:27:50 UTC 2025


On Wed, 22 Jan 2025 10:05:11 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

> Redundant after Security Manager removal, remove the Subject.callAs() call on a MashalledObject.cast().
> Previously, a Policy could possibly have restricted permissable classes available to the cast().
> 
> Nothing in our tests fails if we remove the callAs.
> 
> Also fixing a comment typo ("reqIncomming") and rewording that comment.

Makes sense to me (to drop the callAs).
With an SM (and policy) it might allow as cast to a class that would have been restricted by policy.
Without the SM the subject can’t affect the cast.

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

Marked as reviewed by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23230#pullrequestreview-2570012725


More information about the jmx-dev mailing list