-
CSR
-
Resolution: Approved
-
P4
-
behavioral
-
minimal
-
Define new optional system property.
-
Java API, System or security property
-
SE
Summary
Add a new system property, java.specification.maintenance.version
, to return the maintenance release number of the Java SE specification being implemented by the JDK.
Problem
There is no existing programmatic way to determine if a JDK is implementing an original release Java SE specification or a maintenance release to a Java SE specification.
Solution
Add an optional property, java.specification.maintenance.version
, to the list of properties defined by System.getProperties()
. The property is unset, optional in the terminology of System.getProperties, for an initial release of a specification. Subsequent values are "1", "2", etc.
Specification
Add the row entry to the table in the System.getProperties() method description,
* <td>Java Runtime Environment specification version, whose value is
* the {@linkplain Runtime.Version#feature feature} element of the
* {@linkplain Runtime#version() runtime version}</td></tr>
+ * <tr><th scope="row">{@code java.specification.maintenance.version}</th>
+ * <td>Java Runtime Environment specification maintenance version,
+ * may be interpreted as a positive integer <em>(optional, see below)</em></td></tr>
* <tr><th scope="row">{@code java.specification.vendor}</th>
* <td>Java Runtime Environment specification vendor</td></tr>
* <tr><th scope="row">{@code java.specification.name}</th>
Add to the System.getProperties() method description below the table,
* </tbody>
* </table>
* <p>
+ * The {@code java.specification.maintenance.version} property is
+ * defined if the specification implemented by this runtime at the
+ * time of its construction had undergone a <a
+ * href="https://jcp.org/en/procedures/jcp2#3.6.4">maintenance
+ * release</a>. When defined, its value identifies that
+ * maintenance release. To indicate the first maintenance release
+ * this property will have the value {@code "1"}, to indicate the
+ * second maintenance release this property will have the value
+ * {@code "2"}, and so on.
+ * <p>
* Multiple paths in a system property value are separated by the path
* separator character of the platform.
* <p>
- csr of
-
JDK-8330417 Add system property for Java SE specification maintenance version
- Resolved