geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r776751 - in /geronimo/components/txmanager: branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/ trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/
Date Wed, 20 May 2009 16:12:59 GMT
Author: djencks
Date: Wed May 20 16:12:59 2009
New Revision: 776751

URL: http://svn.apache.org/viewvc?rev=776751&view=rev
Log:
GERONIMO-4639 fix npe in MultiPoolConnectionInterceptor, thanks to bert nor

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java?rev=776751&r1=776750&r2=776751&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
Wed May 20 16:12:59 2009
@@ -181,18 +181,24 @@
                     ^ (cri == null ? 1 : cri.hashCode());
         }
 
+        @Override
         public int hashCode() {
             return hashcode;
         }
 
-        public boolean equals(Object other) {
-            if (!(other instanceof SubjectCRIKey)) {
-                return false;
-            }
-            SubjectCRIKey o = (SubjectCRIKey) other;
-            return hashcode == o.hashcode &&
-                    (subject == null ? o.subject == null : subject.equals(o.subject) &&

-                    cri == null ? o.cri == null : cri.equals(o.cri));
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) return true;
+            if (o == null || getClass() != o.getClass()) return false;
+
+            SubjectCRIKey that = (SubjectCRIKey) o;
+
+            if (hashcode != that.hashcode) return false;
+            if (cri != null ? !cri.equals(that.cri) : that.cri != null) return false;
+            if (subject != null ? !subject.equals(that.subject) : that.subject != null) return
false;
+
+            return true;
         }
+
     }
 }

Modified: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java?rev=776751&r1=776750&r2=776751&view=diff
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
(original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
Wed May 20 16:12:59 2009
@@ -181,18 +181,24 @@
                     ^ (cri == null ? 1 : cri.hashCode());
         }
 
+        @Override
         public int hashCode() {
             return hashcode;
         }
 
-        public boolean equals(Object other) {
-            if (!(other instanceof SubjectCRIKey)) {
-                return false;
-            }
-            SubjectCRIKey o = (SubjectCRIKey) other;
-            return hashcode == o.hashcode &&
-                    (subject == null ? o.subject == null : subject.equals(o.subject) &&

-                    cri == null ? o.cri == null : cri.equals(o.cri));
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) return true;
+            if (o == null || getClass() != o.getClass()) return false;
+
+            SubjectCRIKey that = (SubjectCRIKey) o;
+
+            if (hashcode != that.hashcode) return false;
+            if (cri != null ? !cri.equals(that.cri) : that.cri != null) return false;
+            if (subject != null ? !subject.equals(that.subject) : that.subject != null) return
false;
+
+            return true;
         }
+        
     }
 }



Mime
View raw message