8208157: requires.VMProps throws NPE for missing properties in "release" file
authorshurailine
Tue, 24 Jul 2018 08:58:32 -0700
changeset 51191 96fae3a62612
parent 51190 fb4a7b894fac
child 51192 499b873761d8
8208157: requires.VMProps throws NPE for missing properties in "release" file Reviewed-by: iignatyev, lancea
test/jtreg-ext/requires/VMProps.java
--- a/test/jtreg-ext/requires/VMProps.java	Tue Jul 24 11:37:43 2018 -0700
+++ b/test/jtreg-ext/requires/VMProps.java	Tue Jul 24 08:58:32 2018 -0700
@@ -432,7 +432,8 @@
                 System.getProperty("java.home") + "/release"))) {
             Properties properties = new Properties();
             properties.load(in);
-            return properties.getProperty("IMPLEMENTOR").replace("\"", "");
+            String implementorProperty = properties.getProperty("IMPLEMENTOR");
+            return (implementorProperty == null) ? "null" : implementorProperty.replace("\"", "");
         } catch (IOException e) {
             e.printStackTrace();
         }