Skip to content

Commit

Permalink
Fix NPE in namespace equals()
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonid Batyuk committed Nov 18, 2014
1 parent cfedd67 commit 29a2415
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ public boolean equals(Object o) {

XmlNamespace namespace = (XmlNamespace) o;

if (!prefix.equals(namespace.prefix)) return false;
if (!uri.equals(namespace.uri)) return false;
if (prefix == null && namespace.prefix != null) return false;
if (uri == null && namespace.uri != null) return false;
if (prefix != null && !prefix.equals(namespace.prefix)) return false;
if (uri != null && !uri.equals(namespace.uri)) return false;

return true;
}
Expand Down

0 comments on commit 29a2415

Please sign in to comment.