13 RFR (XXS) 8197927: Allow the system property `java.vendor.version` to be undefined

mark.reinhold at oracle.com mark.reinhold at oracle.com
Wed Jun 5 23:07:12 UTC 2019


Bug: https://bugs.openjdk.java.net/browse/JDK-8197927
CSR: https://bugs.openjdk.java.net/browse/JDK-8225381

Revise the specification of the `java.lang.System::getProperties` method
to allow the values of specific system properties to be undefined, and
to allow the system property `java.vendor.version` to be undefined.

Javadoc: https://cr.openjdk.java.net/~mr/rev/8179727/java.base/java/lang/System.html#getProperties%28%29

Could I please have reviews for both the patch (below), and the CSR?

Thanks,
- Mark

----

diff --git a/src/java.base/share/classes/java/lang/System.java b/src/java.base/share/classes/java/lang/System.java
--- a/src/java.base/share/classes/java/lang/System.java
+++ b/src/java.base/share/classes/java/lang/System.java
@@ -618,8 +618,9 @@
      * {@link #getProperty(String)} method is returned as a
      * {@code Properties} object. If there is no current set of
      * system properties, a set of system properties is first created and
-     * initialized. This set of system properties always includes values
-     * for the following keys:
+     * initialized. This set of system properties includes a value
+     * for each of the following keys unless the description of the associated
+     * value indicates that the value is optional:
      * <table class="striped" style="text-align:left">
      * <caption style="display:none">Shows property keys and associated values</caption>
      * <thead>
@@ -639,7 +640,7 @@
      * <tr><th scope="row">{@systemProperty java.vendor.url}</th>
      *     <td>Java vendor URL</td></tr>
      * <tr><th scope="row">{@systemProperty java.vendor.version}</th>
-     *     <td>Java vendor version</td></tr>
+     *     <td>Java vendor version <em>(optional)</em> </td></tr>
      * <tr><th scope="row">{@systemProperty java.home}</th>
      *     <td>Java installation directory</td></tr>
      * <tr><th scope="row">{@systemProperty java.vm.specification.version}</th>


More information about the core-libs-dev mailing list