code: public static String getSystemProperty(String propName) {
          final String temp = propName;
          try {
              String prop = AccessController.doPrivileged(
                                                          new PrivilegedAction<String>() {
                                                              @Override
                                                              public String run() {
                                                                  return System.getProperty(temp);
                                                              }
                                                          });
              return prop;
          } catch (SecurityException se) {
              // LOG THE EXCEPTION
              return null;
          }
      }
docs: Using privileged security, retrieve the specified System property
  <p>
  
  @param propName a non-null, non-empty String that specifies the property. The caller must
  guarantee that this String is not null and not the empty String.
  @return the <code>String</code> value of the specified system property, or null. If there
  is no property associated with the specified key, null is returned. If a SecurityException
  is encounted while trying to retrieve the value, the exception is logged and absorbed and
  null is returned.