Skip to content

Commit

Permalink
[JENKINS-48593] - Add getSystemProperty(key) to fix hudson.consoleTai…
Browse files Browse the repository at this point in the history
…lKB system property (#3200)

* Add getSystemProperty(key) to fix hudson.consoleTailKB system property

* Add Javadoc, @restricted and delegate to SystemProperties

These changes were requested by @daniel-beck.

* PR was not merged in time for 2.96

* Changes as requested by @oleg-nenashev
  • Loading branch information
jan-z authored and oleg-nenashev committed Dec 22, 2017
1 parent 90f778d commit 006c512
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/main/java/hudson/Functions.java
Expand Up @@ -469,6 +469,16 @@ public static Map getSystemProperties() {
return new TreeMap<Object,Object>(System.getProperties());
}

/**
* Gets the system property indicated by the specified key.
*
* Delegates to {@link SystemProperties#getString(java.lang.String)}.
*/
@Restricted(DoNotUse.class)
public static String getSystemProperty(String key) {
return SystemProperties.getString(key);
}

public static Map getEnvVars() {
return new TreeMap<String,String>(EnvVars.masterEnvVars);
}
Expand Down

0 comments on commit 006c512

Please sign in to comment.