Author: ruchithf
Date: Sun Mar 25 04:42:35 2007
New Revision: 522193
URL: http://svn.apache.org/viewvc?view=rev&rev=522193
Log:
Prevent NPE
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?view=diff&rev=522193&r1=522192&r2=522193
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
Sun Mar 25 04:42:35 2007
@@ -33,6 +33,7 @@
import org.apache.axiom.om.util.ElementHelper;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -1277,6 +1278,7 @@
// check if the parent of this element has the same namespace
// as the default and if NOT add the attr
boolean parentHasSameDefaultNS = this.parentNode != null &&
+ this.parentNode.getNamespaceURI() != null &&
this.parentNode.getNamespaceURI().equals(this.getNamespaceURI()) &&
(this.parentNode.getPrefix() == null ||
this.parentNode.getPrefix().equals(""));
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]