The test is adapted from the test in the bug report. The headline on the bug report is wrong -- because it uses reflection in the test to do the invocation, the thrown exception is wrapped with InvocationTargetException, which is completely correct. HOWEVER, the exception inside the wrapper is the wrong one.
The new test checks the exception in both the reflective-invocation and plain-invocation cases, and also checks both a method handle call (which threw the wrong exception) and a plain call (which threw, and throws, the right exception). The test also uses a tweaked classloader to substitute the borked bytecodes necessary to get the error, so it is not only shell-free, it can also be run outside jtreg. On 2013-09-12, at 2:34 PM, Christian Thalinger <christian.thalin...@oracle.com> wrote: > > On Sep 12, 2013, at 11:28 AM, David Chase <david.r.ch...@oracle.com> wrote: > >> New webrev, commented line removed: >> http://cr.openjdk.java.net/~drchase/8022701/webrev.03/ > > I think the change is good given that the tests work now. Is your test > derived from the test in the bug report? > > And it would be good if John could also have a quick look (just be to be > sure). > > -- Chris > >> >> On 2013-09-12, at 1:53 PM, David Chase <david.r.ch...@oracle.com> wrote: >> >>> I believe it produced extraneous output -- it was not clear to me that it >>> was either necessary or useful to fully describe all the converted >>> exceptions that lead to the defined exception being thrown. The commented >>> line should have just been removed (I think). >>> >>> On 2013-09-12, at 1:24 PM, Christian Thalinger >>> <christian.thalin...@oracle.com> wrote: >>> >>>> + // err.initCause(ex); >>>> >>>> Why is this commented? >>>> >>>> -- Chris >> >
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev