Include HTTP Method in equals and hashCode

Closes gh-17180

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
This commit is contained in:
Andrey Litvitski 2025-06-23 23:35:59 +03:00 committed by Josh Cummings
parent bd020d8aea
commit 21ee0dce6f
No known key found for this signature in database
GPG Key ID: 869B37A20E876129
1 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ public final class PathPatternRequestMatcher implements RequestMatcher {
if (!(o instanceof PathPatternRequestMatcher that)) {
return false;
}
return Objects.equals(this.pattern, that.pattern);
return Objects.equals(this.pattern, that.pattern) && Objects.equals(this.method, that.method);
}
/**
@ -146,7 +146,7 @@ public final class PathPatternRequestMatcher implements RequestMatcher {
*/
@Override
public int hashCode() {
return Objects.hash(this.pattern);
return Objects.hash(this.pattern, this.method);
}
/**