code: public boolean matches(HttpServletRequest request) {
      if (httpMethod != null && httpMethod != HttpMethod.valueOf(request.getMethod())) { return false; }
      String url = request.getServletPath();
      String pathInfo = request.getPathInfo();
      String query = request.getQueryString();
  
      if (pathInfo != null || query != null) {
        StringBuilder sb = new StringBuilder(url);
        if (pathInfo != null) sb.append(pathInfo);
        if (query != null) sb.append(query);
        url = sb.toString();
      }
      logger.debug("Checking match of request : '{}'; against '{}'", url, pattern);
      return pattern.matcher(url).matches();
    }
docs: Performs the match of the request URL ( {@code servletPath + pathInfo + queryString}) against
  the compiled
  pattern.
  
  @param request the request to match
  @return true if the pattern matches the URL, false otherwise.