RFR: 8208157: requires.VMProps throws NPE for missing properties in "release" file
Erik Joelsson
erik.joelsson at oracle.com
Tue Jul 24 23:50:18 UTC 2018
Looks good.
/Erik
On 2018-07-24 15:48, Alexandre (Shura) Iline 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 core-libs-dev
mailing list