Hi Roger,

Looking good.  I have a few small comments:

I assume VM.saveAndRemoveProperties will be a separate cleanup.
SystemProps::cmdProperties adds the system properties that can
skip adding these internal properties to the Properties object.
In fact, these internal properties are the interface between VM
and libraries that can be replaced with a different mechanism
other than system properties.

Suggest to move the call to VersionProps.init(props) in
SystemProps.initProperties

The `VENDOR*` build time variables can always have a default
like the other constants in VersionProps.  Then no need to
handle if not set.

SystemProps.staticInitOnly_* are a bit odd.  They are temporarily
set with the values and then reset to null.  Perhaps leave
StaticProperty as is for now and re-visit it in the future.
Then I think SystemProps::putDefault can be removed.

Raw::xxx_NDX are initialized to 1 + previous_NDX.  It's a general
good approach to increment the index but I find it error-prone and
hard to catch mistake since the (adjacent) variable names look
so alike. Perhaps some form of verification or assertion to ensure
the indices are correctly initialized.

Mandy

On 11/16/18 10:49 AM, Roger Riggs wrote:
Updates to include the suggestions made by Mandy and Brent:

 - Move the build-time properties from native code to the VersionProps.java.template    including java.vendor.* and java.specification.* properties, plus the java.class.version (major.minor)    This included two changes to the build that generates source of VersionProps.java.

 - Updated the StaticProperty initialization to be explicitly invoked by initProperties.

 - Makes separate calls to native to retrieve the platform properties and VM/command line properties

 - (The hotspot function for JVM_GetProperties are unchanged)

Webrev:
http://cr.openjdk.java.net/~rriggs/webrev-props-only-raw/

Issue:
https://bugs.openjdk.java.net/browse/JDK-4947890

Thanks, Roger



Reply via email to