svn commit: r730303 - /xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: natalia
Date: Tue Dec 30 19:40:47 2008
New Revision: 730303

URL: http://svn.apache.org/viewvc?rev=730303&view=rev
Log:
Fixed NPE for default namespace

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java?rev=730303&r1=730302&r2=730303&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java Tue Dec 30 19:40:47 2008
@@ -60,7 +60,7 @@
                 Map.Entry entry = (Map.Entry) i.next();
                 String pfx = (String) entry.getKey();
                 String uri = (String) entry.getValue();
-                if (pfx.equals("")) {
+                if (pfx == null) {
                     elem.setAttribute("xmlns", uri);
                 } else {
                     elem.setAttribute("xmlns:" + pfx, uri);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.