Source:
<code>public RequestPattern(final UrlPattern url, final RequestMethod method, final Map<String, MultiValuePattern> headers, final Map<String, MultiValuePattern> queryParams, final Map<String, StringValuePattern> cookies, final BasicCredentials basicAuthCredentials, final List<ContentPattern<?>> bodyPatterns, final CustomMatcherDefinition customMatcherDefinition, final ValueMatcher<Request> customMatcher, final List<MultipartValuePattern> multiPattern) { this.url = firstNonNull(url, UrlPattern.ANY); this.method = firstNonNull(method, RequestMethod.ANY); this.headers = headers; this.queryParams = queryParams; this.cookies = cookies; this.basicAuthCredentials = basicAuthCredentials; this.bodyPatterns = bodyPatterns; this.customMatcherDefinition = customMatcherDefinition; this.multipartPatterns = multiPattern; this.hasInlineCustomMatcher = customMatcher != null; this.matcher = new RequestMatcher() { @Override public MatchResult match(Request request) { MatchResult methodMatchResult = RequestPattern.this.method.match(request.getMethod()); MatchResult urlMatchResult = RequestPattern.this.url.match(request.getUrl()); <START> if (!methodMatchResult.isExactMatch() || !urlMatchResult.isExactMatch()) { <END> return MatchResult.aggregateWeighted(new ArrayList<>(asList( weight(urlMatchResult, 10.0), weight(methodMatchResult, 3.0) ))); } List<WeightedMatchResult> matchResults = new ArrayList<>(asList( weight(urlMatchResult, 10.0), weight(methodMatchResult, 3.0), weight(allHeadersMatchResult(request)), weight(allQueryParamsMatch(request)), weight(allCookiesMatch(request)), weight(allBodyPatternsMatch(request)), weight(allMultipartPatternsMatch(request)) )); if (hasInlineCustomMatcher) { matchResults.add(weight(customMatcher.match(request))); } return MatchResult.aggregateWeighted(matchResults); } @Override public String getName() { return "request-matcher"; } }; }</code><technical_language>problem bailing out early is affects distance score searching for nearest misses for diff report. surprised this a test failure, this a bit further</technical_language>

Target:
public RequestPattern(final UrlPattern url, final RequestMethod method, final Map<String, MultiValuePattern> headers, final Map<String, MultiValuePattern> queryParams, final Map<String, StringValuePattern> cookies, final BasicCredentials basicAuthCredentials, final List<ContentPattern<?>> bodyPatterns, final CustomMatcherDefinition customMatcherDefinition, final ValueMatcher<Request> customMatcher, final List<MultipartValuePattern> multiPattern) { this.url = firstNonNull(url, UrlPattern.ANY); this.method = firstNonNull(method, RequestMethod.ANY); this.headers = headers; this.queryParams = queryParams; this.cookies = cookies; this.basicAuthCredentials = basicAuthCredentials; this.bodyPatterns = bodyPatterns; this.customMatcherDefinition = customMatcherDefinition; this.multipartPatterns = multiPattern; this.hasInlineCustomMatcher = customMatcher != null; this.matcher = new RequestMatcher() { @Override public MatchResult match(Request request) { List<WeightedMatchResult> matchResults = new ArrayList<>(asList( weight(RequestPattern.this.url.match(request.getUrl()), 10.0), weight(RequestPattern.this.method.match(request.getMethod()), 3.0), weight(allHeadersMatchResult(request)), weight(allQueryParamsMatch(request)), weight(allCookiesMatch(request)), weight(allBodyPatternsMatch(request)), weight(allMultipartPatternsMatch(request)) )); if (hasInlineCustomMatcher) { matchResults.add(weight(customMatcher.match(request))); } return MatchResult.aggregateWeighted(matchResults); } @Override public String getName() { return "request-matcher"; } }; }