docs: protected HttpServletRequest getServletRequestFromExternalContext(
              ExternalContext externalContext) {
          Object request = externalContext.getNativeRequest();
  
          if (request instanceof PortletRequest) {
              return portalRequestUtils.getPortletHttpRequest(
                      (PortletRequest) externalContext.getNativeRequest());
          } else if (request instanceof HttpServletRequest) {
              return (HttpServletRequest) request;
          }
  
          // give up and throw an error
          else {
              throw new IllegalArgumentException(
                      "Unable to recognize the native request associated with the supplied external context");
          }
      }