GERONIMO-4639 fix npe in MultiPoolConnectionInterceptor, thanks to bert nor

git-svn-id: https://svn.apache.org/repos/asf/geronimo/components/txmanager/trunk@776751 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java b/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
index 750c623..3534f73 100644
--- a/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
+++ b/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/MultiPoolConnectionInterceptor.java
@@ -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;
         }
+        
     }
 }