Skip to content
Permalink
Browse files
GERONIMO-4639 fix npe in MultiPoolConnectionInterceptor, thanks to be…
…rt nor

git-svn-id: https://svn.apache.org/repos/asf/geronimo/components/txmanager/trunk@776751 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
djencks committed May 20, 2009
1 parent ab37116 commit 549bc0302b7a8805b627468ca2e4e959e47a14ae
Showing 1 changed file with 14 additions and 8 deletions.
@@ -181,18 +181,24 @@ public SubjectCRIKey(
^ (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;
}

}
}

0 comments on commit 549bc03

Please sign in to comment.