docs: private static Date parseHTTPDateImpl(final String pDate) throws NumberFormatException  {
          if (pDate == null) {
              throw new IllegalArgumentException("date == null");
          }
  
          if (StringUtil.isEmpty(pDate)) {
              throw new NumberFormatException("Invalid HTTP date: \"" + pDate + "\"");
          }
  
          DateFormat format;
  
          if (pDate.indexOf('-') >= 0) {
              format = HTTP_RFC850_FORMAT;
              update50YearWindowIfNeeded();
          }
          else if (pDate.indexOf(',') < 0) {
              format = HTTP_ASCTIME_FORMAT;
              update50YearWindowIfNeeded();
          }
          else {
              format = HTTP_RFC1123_FORMAT;
              // NOTE: RFC1123 always uses 4-digit years
          }
  
          Date date;
          try {
              //noinspection SynchronizationOnLocalVariableOrMethodParameter
              synchronized (format) {
                  date = format.parse(pDate);
              }
          }
          catch (ParseException e) {
              NumberFormatException nfe = new NumberFormatException("Invalid HTTP date: \"" + pDate + "\"");
              nfe.initCause(e);
              throw nfe;
          }
  
          if (date == null) {
              throw new NumberFormatException("Invalid HTTP date: \"" + pDate + "\"");
          }
  
          return date;
      }