RFR: 8208157: requires.VMProps throws NPE for missing properties in "release" file
Igor Ignatyev
igor.ignatyev at oracle.com
Tue Jul 24 22:51:35 UTC 2018
looks good to me.
-- Igor
> On Jul 24, 2018, at 3:48 PM, Alexandre (Shura) Iline <alexandre.iline at oracle.com> wrote:
>
> Hi,
>
> Could you please tale a quick look on this simple fix?
>
> diff --git a/test/jtreg-ext/requires/VMProps.java b/test/jtreg-ext/requires/VMProps.java
> --- a/test/jtreg-ext/requires/VMProps.java
> +++ b/test/jtreg-ext/requires/VMProps.java
> @@ -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();
> }
>
>
> Thank you.
>
> Shura
More information about the build-dev
mailing list