JDK-8231354 : expose VM.getSavedSystemProperty in java.lang.System
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-09-23
  • Updated: 2019-09-23
  • Resolved: 2019-09-23
Related Reports
Duplicate :  
Description
The internal method jdk.internal.misc.VM.getSavedSystemProperty() is the only way to get the value of a system property with the guarantee that it cannot have been modified by non-platform code calling System.setProperty(). This functionality is exposed by jdk.vm.ci.services.Services.getSavedProperty(String) for use in Graal to isolate Graal configuration from application code. This is useful functionality that should be made into a standard public API. For example System.getSavedProperty(String).
Comments
JDK-4165411 is a long-standing RFE to support read-only system properties. There has been discussion to define new API for this RFE. Saving the system properties during initPhase1 has just been a stop-gap solution.
23-09-2019