You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/04/20 16:16:00 UTC

[jira] [Closed] (LANG-1393) Add API SystemUtils.String getEnvironmentVariable(final String name, final String defaultValue)

     [ https://issues.apache.org/jira/browse/LANG-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory closed LANG-1393.
------------------------------
    Resolution: Fixed

In git master.

> Add API SystemUtils.String getEnvironmentVariable(final String name, final String defaultValue)
> -----------------------------------------------------------------------------------------------
>
>                 Key: LANG-1393
>                 URL: https://issues.apache.org/jira/browse/LANG-1393
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>            Priority: Major
>             Fix For: 3.8
>
>
> Add API in {{SystemUtils}}:
> {{String getEnvironmentVariable(final String name, final String defaultValue)}}
> Javadoc:
> {code:java}
>     /**
>      * <p>
>      * Gets an environment variable, defaulting to {@code defaultValue} if the variable cannot be read.
>      * </p>
>      * <p>
>      * If a {@code SecurityException} is caught, the return value is {@code defaultValue} and a message is written to
>      * {@code System.err}.
>      * </p>
>      *
>      * @param name
>      *            the environment variable name
>      * @param defaultValue
>      *            the default value
>      * @return the environment variable value or {@code defaultValue} if a security problem occurs
>      * @since 3.8
>      */
>     public static String getEnvironmentVariable(final String name, final String defaultValue) 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)