Author: violetagg
Date: Tue May 27 19:45:55 2014
New Revision: 1597858

URL: http://svn.apache.org/r1597858
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55282
Merged revision 1597855 from tomcat/trunk:
o.a.t.util.descriptor.web.ApplicationListener overrides equals and hashCode 
methods.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/ApplicationListener.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1597855

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/ApplicationListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/ApplicationListener.java?rev=1597858&r1=1597857&r2=1597858&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/ApplicationListener.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/ApplicationListener.java 
Tue May 27 19:45:55 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/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1597858&r1=1597857&r2=1597858&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue May 27 19:45:55 2014
@@ -58,6 +58,10 @@
 <section name="Tomcat 7.0.55 (violetagg)">
   <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>
       <add>
         <bug>56461</bug>: New <code>failCtxIfServletStartFails</code> attribute
         on Context and Host configuration to force the context startup to fail



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

Reply via email to