changeset 52341:26777794ade5

8212154: [TESTBUG] CheckArchivedModuleApp fails with NPE when JVMCI is absent Summary: added a null check on wb.getBooleanVMFlag("EnableJVMCI"). Reviewed-by: hseigel, jiangli
author ccheung
date Mon, 29 Oct 2018 13:58:29 -0700
parents 625f6c742392
children 52d3bb5ba2f7
files test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }