tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From violet...@apache.org
Subject svn commit: r1597855 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/web/ApplicationListener.java webapps/docs/changelog.xml
Date Tue, 27 May 2014 19:32:11 GMT
Author: violetagg
Date: Tue May 27 19:32:11 2014
New Revision: 1597855

URL: http://svn.apache.org/r1597855
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55282
o.a.t.util.descriptor.web.ApplicationListener overrides equals and hashCode methods.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/ApplicationListener.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/ApplicationListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/ApplicationListener.java?rev=1597855&r1=1597854&r2=1597855&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/ApplicationListener.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/ApplicationListener.java Tue May
27 19:32:11 2014
@@ -40,4 +40,33 @@ public class ApplicationListener {
     public boolean isPluggabilityBlocked() {
         return pluggabilityBlocked;
     }
+
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((className == null) ? 0 : className.hashCode());
+        return result;
+    }
+
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof ApplicationListener)) {
+            return false;
+        }
+        ApplicationListener other = (ApplicationListener) obj;
+        if (className == null) {
+            if (other.className != null) {
+                return false;
+            }
+        } else if (!className.equals(other.className)) {
+            return false;
+        }
+        return true;
+    }
 }
\ No newline at end of file

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1597855&r1=1597854&r2=1597855&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue May 27 19:32:11 2014
@@ -48,6 +48,10 @@
   <subsection name="Catalina">
     <changelog>
       <fix>
+        <bug>55282</bug>: Ensure that one and the same application listener is
+        added only once when starting the web application. (violetagg)
+      </fix>
+      <fix>
         <bug>55975</bug>: Apply consistent escaping for double quote and
         backslash characters when escaping cookie values. (markt)
       </fix>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message