8212154: [TESTBUG] CheckArchivedModuleApp fails with NPE when JVMCI is absent
authorccheung
Mon, 29 Oct 2018 13:58:29 -0700
changeset 52320 26777794ade5
parent 52319 625f6c742392
child 52321 52d3bb5ba2f7
8212154: [TESTBUG] CheckArchivedModuleApp fails with NPE when JVMCI is absent Summary: added a null check on wb.getBooleanVMFlag("EnableJVMCI"). Reviewed-by: hseigel, jiangli
test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java
--- a/test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java	Wed Oct 17 15:57:10 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java	Mon Oct 29 13:58:29 2018 -0700
@@ -52,7 +52,8 @@
         boolean expectArchivedConfiguration = "yes".equals(args[1]);
         // -XX:+EnableJVMCI adds extra system modules, in which case the system
         // module objects are not archived.
-        if (wb.getBooleanVMFlag("EnableJVMCI")) {
+        Boolean enableJVMCI = wb.getBooleanVMFlag("EnableJVMCI");
+        if (enableJVMCI != null && enableJVMCI) {
             expectArchivedDescriptors = false;
             expectArchivedConfiguration = false;
         }