commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LANG-1393) Add API SystemUtils.String getEnvironmentVariable(final String name, final String defaultValue)
Date Fri, 20 Apr 2018 16:16:00 GMT

     [ 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)

Mime
View raw message