8212154: [TESTBUG] CheckArchivedModuleApp fails with NPE when JVMCI is absent

Added a null check on wb.getBooleanVMFlag("EnableJVMCI").

Reviewed-by: hseigel, jiangli
This commit is contained in:
Calvin Cheung 2018-10-29 13:58:29 -07:00
parent 93395f6a9e
commit efce2c0397

View File

@ -52,7 +52,8 @@ public class CheckArchivedModuleApp {
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;
}