changeset 51874:96fae3a62612

8208157: requires.VMProps throws NPE for missing properties in "release" file Reviewed-by: iignatyev, lancea
author shurailine
date Tue, 24 Jul 2018 08:58:32 -0700
parents fb4a7b894fac
children 499b873761d8
files test/jtreg-ext/requires/VMProps.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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();
         }