mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 18:33:41 +00:00
8285497: Add system property for Java SE specification maintenance version
Reviewed-by: mullan, jpai, iris
This commit is contained in:
parent
6d7e446162
commit
59ef76a365
@ -732,6 +732,9 @@ public final class System {
|
||||
* <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">{@systemProperty 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">{@systemProperty java.specification.vendor}</th>
|
||||
* <td>Java Runtime Environment specification vendor</td></tr>
|
||||
* <tr><th scope="row">{@systemProperty java.specification.name}</th>
|
||||
@ -779,6 +782,16 @@ public final class System {
|
||||
* </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>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -109,6 +109,10 @@ class VersionProps {
|
||||
props.put("java.class.version", CLASSFILE_MAJOR_MINOR);
|
||||
|
||||
props.put("java.specification.version", VERSION_SPECIFICATION);
|
||||
|
||||
// Uncomment next props.put call after the first maintenance release for a
|
||||
// platform specification is done and set the MR number, starting at "1".
|
||||
// props.put("java.specification.maintenance.version", "1");
|
||||
props.put("java.specification.name", "Java Platform API Specification");
|
||||
props.put("java.specification.vendor", "Oracle Corporation");
|
||||
|
||||
|
||||
@ -614,6 +614,9 @@ public class PolicyFile extends java.security.Policy {
|
||||
pe.add(new PropertyPermission
|
||||
("java.specification.version",
|
||||
SecurityConstants.PROPERTY_READ_ACTION));
|
||||
pe.add(new PropertyPermission
|
||||
("java.specification.maintenance.version",
|
||||
SecurityConstants.PROPERTY_READ_ACTION));
|
||||
pe.add(new PropertyPermission
|
||||
("java.specification.vendor",
|
||||
SecurityConstants.PROPERTY_READ_ACTION));
|
||||
|
||||
@ -30,6 +30,8 @@ grant {
|
||||
permission java.util.PropertyPermission "line.separator", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"java.specification.version", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"java.specification.maintenance.version", "read";
|
||||
permission java.util.PropertyPermission "java.specification.vendor", "read";
|
||||
permission java.util.PropertyPermission "java.specification.name", "read";
|
||||
permission java.util.PropertyPermission
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user