code: public void loadProperties(Properties props) {
          for (Map.Entry<Object, Object> entry: props.entrySet()) {
              String key = (String) entry.getKey();
              Object value = entry.getValue();
              if (key != null && value != null) {
                  setProperty(key, value);
              }
          }
      }
docs: Load properties into the configuration. This method iterates through
  the entries of the properties and call {@link #setProperty(String, Object)} for
  non-null key/value.