RFR: 8277932: Subject:callAs() not throwing NPE when action is null

Roger Riggs rriggs at openjdk.java.net
Mon Dec 6 23:37:14 UTC 2021


On Mon, 6 Dec 2021 22:22:14 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> Add null check. I must have thought the NPE will be thrown anyway but the `catch Exception` block swallows it.
> 
> I added a noreg-trivial label. If you think differently can add one.

Yes, the stack trace will be more useful with the explicit check, otherwise it would be buried inside other calls and it won't be so obvious that the argument passed to callAs is null.

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

Marked as reviewed by rriggs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6728


More information about the security-dev mailing list