Re: RFR: 8277932: Subject:callAs() not throwing NPE when action is null
On Tue, 7 Dec 2021 07:14:53 GMT, Alan Bateman wrote: > Is there a test for this? (I see noreg-trivial is added but a test should be > easy to add). I can add one, just thought it's not necessary. I didn't say noreg-hard. :-) - PR: https://git.openjdk.java.net/jdk/pull/6728
Re: RFR: 8277932: Subject:callAs() not throwing NPE when action is null
On Mon, 6 Dec 2021 22:22:14 GMT, Weijun Wang 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. Is there a test for this? (I see noreg-trivial is added but a test should be easy to add). - PR: https://git.openjdk.java.net/jdk/pull/6728
Re: RFR: 8277932: Subject:callAs() not throwing NPE when action is null
On Mon, 6 Dec 2021 22:22:14 GMT, Weijun Wang 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