code: public static HttpMethod valueOf(String name) {
          if (name == null) {
              throw new NullPointerException("name");
          }
  
          name = name.trim().toUpperCase();
          if (name.length() == 0) {
              throw new IllegalArgumentException("empty name");
          }
  
          HttpMethod result = methodMap.get(name);
          if (result != null) {
              return result;
          } else {
              return new HttpMethod(name);
          }
      }
docs: Returns the {@link HttpMethod} represented by the specified name.
  If the specified name is a standard HTTP method name, a cached instance
  will be returned.  Otherwise, a new instance will be returned.