docs: @SuppressWarnings({ "unchecked", "rawtypes" })
      public static String setPropertyAsNeeded(final String propName, final String propValue) {
  
          String previousPropValue = (String) java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
              @Override
              public String run() {
                  String oldPropValue = System.getProperty(propName);
                  if (propValue == null) {
                      System.clearProperty(propName);
                  } else if (!propValue.equalsIgnoreCase(oldPropValue)) {
                      System.setProperty(propName, propValue);
                  }
                  return oldPropValue;
              }
          });
          if (tc.isDebugEnabled())
              Tr.debug(tc, propName + " property previous: " + ((previousPropValue != null) ? previousPropValue : "<null>") + " and now: " + propValue);
  
          return previousPropValue;
      }