gdaniels 02/01/31 13:01:32 Modified: java/src/org/apache/axis/encoding TypeMappingImpl.java Log: Fix NPEs in equality check Revision Changes Path 1.4 +13 -1 xml-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java Index: TypeMappingImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TypeMappingImpl.java 31 Jan 2002 03:26:09 -0000 1.3 +++ TypeMappingImpl.java 31 Jan 2002 21:01:32 -0000 1.4 @@ -95,8 +95,20 @@ this.xmlType = xmlType; } public boolean equals(Object o) { + if (o == null) return false; Pair p = (Pair) o; - return (p.xmlType.equals(this.xmlType) && p.javaType.equals(this.javaType)); + if (p.xmlType == null) { + if (this.xmlType != null) + return false; + } else { + if (!p.xmlType.equals(this.xmlType)) + return false; + } + if (p.javaType == null) { + return (this.javaType == null); + } else { + return (p.javaType.equals(this.javaType)); + } } public int hashCode() { return javaType.hashCode();