Uses pattern to calculate hashCode and equals

Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/af27d692
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/af27d692
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/af27d692

Branch: refs/heads/master
Commit: af27d692dedc0c79f4d26fc4d0fc404c65227fa7
Parents: 6da61ff
Author: Lukasz Lenart <lukaszlen...@apache.org>
Authored: Thu May 5 10:37:42 2016 +0200
Committer: Lukasz Lenart <lukaszlen...@apache.org>
Committed: Thu May 5 10:37:42 2016 +0200

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/config/entities/AllowedMethods.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/af27d692/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java
index d7741da..d81de5a 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java
@@ -154,13 +154,13 @@ public class AllowedMethods {
 
             PatternAllowedMethod that = (PatternAllowedMethod) o;
 
-            return original.equals(that.original);
+            return 
allowedMethodPattern.pattern().equals(that.allowedMethodPattern.pattern());
 
         }
 
         @Override
         public int hashCode() {
-            return original.hashCode();
+            return allowedMethodPattern.pattern().hashCode();
         }
 
         @Override

Reply via email to