mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-08 03:32:39 +00:00
Include HTTP Method in equals and hashCode
Closes gh-17180 Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
This commit is contained in:
parent
bd020d8aea
commit
25d51a0d99
@ -138,7 +138,7 @@ public final class PathPatternRequestMatcher implements RequestMatcher {
|
|||||||
if (!(o instanceof PathPatternRequestMatcher that)) {
|
if (!(o instanceof PathPatternRequestMatcher that)) {
|
||||||
return false;
|
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
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(this.pattern);
|
return Objects.hash(this.pattern, this.method);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user