Re: RFR: 8208157: requires.VMProps throws NPE for missing properties in "release" file

2018-07-24 Thread Erik Joelsson

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




Re: RFR: 8208157: requires.VMProps throws NPE for missing properties in "release" file

2018-07-24 Thread Lance Andersen
Looks fine shura
> On Jul 24, 2018, at 6:48 PM, 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

 
  

 Lance Andersen| 
Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
lance.ander...@oracle.com 





Re: RFR: 8208157: requires.VMProps throws NPE for missing properties in "release" file

2018-07-24 Thread Igor Ignatyev
looks good to me.

-- Igor

> On Jul 24, 2018, at 3:48 PM, 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



RFR: 8208157: requires.VMProps throws NPE for missing properties in "release" file

2018-07-24 Thread Alexandre (Shura) Iline
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

Re: RFR: Update build documentation to reflect compiler upgrades at Oracle

2018-07-24 Thread Erik Joelsson

Hello,

We will most likely need to drop support for older VS in JDK 12 as there 
is much interest to move to a later C++ standard in Hotspot. That change 
has not happened yet though and will certainly require a JEP (the C++ 
standard change part). In the meantime, if you need JDK 12 to work on 
VS2013, I think your change makes sense (unless it's a step backwards 
from a standards perspective, hopefully Kim or someone better versed in 
language and standard libs can answer that).


I would recommend upgrading your build environment to VS2017 instead if 
possible. You only need the "BuildTools" distribution to build OpenJDK. 
The community edition also works. Installing it in parallel with VS2013 
works fine. JDK 11/12 builds will automatically pick 2017 and JDK 8/9/10 
will automatically pick 2013.


/Erik


On 2018-07-23 23:06, Michal Vala wrote:

Aha, this is for 11. It's ok then.

On 07/24/2018 08:02 AM, Michal Vala wrote:

Hi,

On 07/23/2018 07:13 PM, Erik Joelsson wrote:
The build documentation needs to be updated to reflect the compiler 
updates that took place at Oracle for JDK 11.


Bug: https://bugs.openjdk.java.net/browse/JDK-8208096

Webrev: http://cr.openjdk.java.net/~erikj/8208096/webrev.01/

/Erik



OpenJDK is currently not buildable with Visual Studio <2015 due to 
missing `snprintf`[1].


We should either update the doc to minimal version 2015, or commit 
JDK-8208084 from another RFR[2].


[1] - https://bugs.openjdk.java.net/browse/JDK-8208084
[2] - 
http://mail.openjdk.java.net/pipermail/build-dev/2018-July/022748.html






Re: RFR: Update build documentation to reflect compiler upgrades at Oracle

2018-07-24 Thread Michal Vala

Aha, this is for 11. It's ok then.

On 07/24/2018 08:02 AM, Michal Vala wrote:

Hi,

On 07/23/2018 07:13 PM, Erik Joelsson wrote:
The build documentation needs to be updated to reflect the compiler updates 
that took place at Oracle for JDK 11.


Bug: https://bugs.openjdk.java.net/browse/JDK-8208096

Webrev: http://cr.openjdk.java.net/~erikj/8208096/webrev.01/

/Erik



OpenJDK is currently not buildable with Visual Studio <2015 due to missing 
`snprintf`[1].


We should either update the doc to minimal version 2015, or commit JDK-8208084 
from another RFR[2].


[1] - https://bugs.openjdk.java.net/browse/JDK-8208084
[2] - http://mail.openjdk.java.net/pipermail/build-dev/2018-July/022748.html


--
Michal Vala
OpenJDK QE
Red Hat Czech


Re: RFR: JDK-8208084: Windows build failure - "'snprintf': identifier not found"

2018-07-24 Thread Michal Vala




On 07/23/2018 07:15 PM, Erik Joelsson wrote:

Hello,

On 2018-07-23 08:27, Kim Barrett wrote:

On Jul 23, 2018, at 9:38 AM, Michal Vala  wrote:

Hi,

JDK-8208084 introduced build failure on Windows, where `snprintf` function is 
not implemented by Visual Studio 2013 (currently latest compiler supported by 
OpenJDK).


I believe using `sprintf` is safe here. Please see the webrev. If it's ok, I 
would also need a sponsor for this.


bug: https://bugs.openjdk.java.net/browse/JDK-8208084
webrev: http://cr.openjdk.java.net/~mvala/jdk/jdk/JDK-8208084/webrev.00/


Thanks

--
Michal Vala
OpenJDK QE
Red Hat Czech

It seems there's some documentation that needs to be updated.  JDK 11
supports building with VS2017, and I think with JDK 12 we'll be
requiring it, in preparation for starting to use features from more
recent C++ standards.


Indeed, that's on me. I just sent out an RFR to correct this.


Your changeset doesn't update minimal Visual Studio version. It's not buildable 
with VS2010.


--
Michal Vala
OpenJDK QE
Red Hat Czech


Re: RFR: Update build documentation to reflect compiler upgrades at Oracle

2018-07-24 Thread Michal Vala

Hi,

On 07/23/2018 07:13 PM, Erik Joelsson wrote:
The build documentation needs to be updated to reflect the compiler updates that 
took place at Oracle for JDK 11.


Bug: https://bugs.openjdk.java.net/browse/JDK-8208096

Webrev: http://cr.openjdk.java.net/~erikj/8208096/webrev.01/

/Erik



OpenJDK is currently not buildable with Visual Studio <2015 due to missing 
`snprintf`[1].


We should either update the doc to minimal version 2015, or commit JDK-8208084 
from another RFR[2].


[1] - https://bugs.openjdk.java.net/browse/JDK-8208084
[2] - http://mail.openjdk.java.net/pipermail/build-dev/2018-July/022748.html
--
Michal Vala
OpenJDK QE
Red Hat Czech