code: private static String tryGetProperty(String key, String defaultValue) {
          try {
              return System.getProperty(key, defaultValue);
          } catch (SecurityException e) {
              logger.error("Could not get value of property {} due to SecurityManager. Using default value.", key);
              return null;
          }
      }
docs: Try to retrieve a system property and returns the defaultValue if SecurityManager blocks it.
  
  @param key Name of the system property to get the string for.
  @param defaultValue Value to be returned on unsuccessful operation or if the propety is not set.
  
  @return the value of the System property