RFR: CODETOOLS-7902929: JMH generators fail for benchmark in unnamed package
Jason Zaugg
jzaugg at openjdk.java.net
Mon May 10 13:29:46 UTC 2021
Prior to the patch, the enclosed test failed with:
$ mvn -Preflection test
...
Running UnnamedPackageTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec <<< FAILURE! - in UnnamedPackageTest
compileTest(UnnamedPackageTest) Time elapsed: 0.004 sec <<< FAILURE!
java.lang.AssertionError: Annotation generator had thrown the exception.:
java.lang.NullPointerException
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.assertTrue(Assert.java:42)
at UnnamedPackageTest.compileTest(UnnamedPackageTest.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
-------------
Commit messages:
- Address review feedback: really fix asm generator, restore private
- Address review feedback: fix asm generator, use assertFail overload
- CODETOOLS-7902929 NPE in reflection generator + unnamed package
Changes: https://git.openjdk.java.net/jmh/pull/38/files
Webrev: https://webrevs.openjdk.java.net/?repo=jmh&pr=38&range=00
Issue: https://bugs.openjdk.java.net/browse/CODETOOLS-7902929
Stats: 63 lines in 3 files changed: 56 ins; 0 del; 7 mod
Patch: https://git.openjdk.java.net/jmh/pull/38.diff
Fetch: git fetch https://git.openjdk.java.net/jmh pull/38/head:pull/38
PR: https://git.openjdk.java.net/jmh/pull/38
More information about the jmh-dev
mailing list