RFR(XS) : 8145845 : [AOT] NullPointerException in compiler/whitebox/GetCodeHeapEntriesTest.java

Igor Ignatyev igor.ignatyev at oracle.com
Tue Feb 12 01:38:38 UTC 2019


http://cr.openjdk.java.net/~iignatyev//8145845/webrev.00/index.html
> 5 lines changed: 0 ins; 3 del; 2 mod;

Hi all,

could you please review this small and trivial patch for whitebox and GetCodeHeapEntriesTest test? the test fails when run w/ AOT'ed java.base b/c WhiteBox::getCodeHeapEntries() returns null if there are no blob of the given type. the patch changes the method to return an empty array instead.

I've also fixed the test to correctly use Optional, before it used ::get() method which might throw NoSuchElementException exception, now it uses ::orElse(null) so we will get an error from the assertion at line #81 instead.

webrev: http://cr.openjdk.java.net/~iignatyev//8145845/webrev.00/index.html
JBS: https://bugs.openjdk.java.net/browse/JDK-8145845
testing: GetCodeHeapEntriesTest.java test w/ and w/o AOT'ed java.base

Thanks,
-- Igor


More information about the hotspot-compiler-dev mailing list