From 78d54959458d0e3bd88076fba4e1f35e083cc193 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Fri, 25 Mar 2011 20:44:18 +0000 Subject: [PATCH] SEC-1702: Add Burt's patch implementing hashcode method in AntPathRequestMatcher --- .../security/web/util/AntPathRequestMatcher.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/src/main/java/org/springframework/security/web/util/AntPathRequestMatcher.java b/web/src/main/java/org/springframework/security/web/util/AntPathRequestMatcher.java index c72ed6e1e1..49a4c88fb8 100644 --- a/web/src/main/java/org/springframework/security/web/util/AntPathRequestMatcher.java +++ b/web/src/main/java/org/springframework/security/web/util/AntPathRequestMatcher.java @@ -132,6 +132,15 @@ public final class AntPathRequestMatcher implements RequestMatcher { this.httpMethod == other.httpMethod; } + @Override + public int hashCode() { + int code = 31 ^ pattern.hashCode(); + if (httpMethod != null) { + code ^= httpMethod.hashCode(); + } + return code; + } + @Override public String toString() { StringBuilder sb = new StringBuilder();