abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r774027 - /abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
Date Tue, 12 May 2009 19:11:55 GMT
Author: jmsnell
Date: Tue May 12 19:11:55 2009
New Revision: 774027

URL: http://svn.apache.org/viewvc?rev=774027&view=rev
Log:
avoid potential NPE

Modified:
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java?rev=774027&r1=774026&r2=774027&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
Tue May 12 19:11:55 2009
@@ -212,7 +212,7 @@
   
   private boolean needToWriteNamespace(String prefix, String namespace) {
     NamespaceContext nc = writer.getNamespaceContext();
-    String uri = nc.getNamespaceURI(prefix);
+    String uri = nc.getNamespaceURI(prefix != null ? prefix : "");
     return uri != null ? !uri.equals(namespace) : true;
   }
   



Mime
View raw message