This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit f695782a15c1bd672a7b3d79bccca31da468fcdf Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Jun 11 18:29:03 2019 +0100 Implement equals() and hashCode() because compareTo() is implemented --- java/javax/el/Util.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/java/javax/el/Util.java b/java/javax/el/Util.java index e7e20d2..af428ab 100644 --- a/java/javax/el/Util.java +++ b/java/javax/el/Util.java @@ -802,6 +802,26 @@ class Util { } } } + + @Override + public boolean equals(Object o) + { + return o == this || (null != o && + this.getClass().equals(o.getClass()) && + ((MatchResult)o).getExact() == this.getExact() && + ((MatchResult)o).getAssignable() == this.getAssignable() && + ((MatchResult)o).getCoercible() == this.getCoercible() && + ((MatchResult)o).isBridge() == this.isBridge()); + } + + @Override + public int hashCode() + { + return (this.isBridge() ? 1 << 24 : 0) ^ + this.getExact() << 16 ^ + this.getAssignable() << 8 ^ + this.getCoercible(); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org