Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1393

Add API SystemUtils.String getEnvironmentVariable(final String name, final String defaultValue)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.8
    • lang.*
    • None

    Description

      Add API in SystemUtils:

      String getEnvironmentVariable(final String name, final String defaultValue)

      Javadoc:

          /**
           * <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) 
      

      Attachments

        Activity

          People

            ggregory Gary D. Gregory
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: