Class SystemPropertiesUtil


  • public class SystemPropertiesUtil
    extends java.lang.Object
    Utility methods for working with System properties.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getPropertyOrDefaultSandbox​(java.lang.String propertyName, java.lang.String defaultVal)
      Attempts to retrieve a system property; if the property is not found, or if a SecurityException is thrown (for example, in a sandbox environment) will return the default value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SystemPropertiesUtil

        public SystemPropertiesUtil()
    • Method Detail

      • getPropertyOrDefaultSandbox

        public static java.lang.String getPropertyOrDefaultSandbox​(java.lang.String propertyName,
                                                                   java.lang.String defaultVal)
        Attempts to retrieve a system property; if the property is not found, or if a SecurityException is thrown (for example, in a sandbox environment) will return the default value. Will swallow stack traces and any SecurityExceptions, and will not log any output to the console.
        Parameters:
        propertyName - property to retrieve
        defaultVal - value to use if not found, or not allowed to use the property
        Returns: