cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r984454 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Wed, 11 Aug 2010 15:57:37 GMT
Author: dkulp
Date: Wed Aug 11 15:57:37 2010
New Revision: 984454

URL: http://svn.apache.org/viewvc?rev=984454&view=rev
Log:
[CXF-2919] Add an NPE guard

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=984454&r1=984453&r2=984454&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Wed Aug
11 15:57:37 2010
@@ -784,7 +784,9 @@ public final class StaxUtils {
         }
         case Node.DOCUMENT_TYPE_NODE:
             try {
-                writer.writeDTD(((DocumentType)n).getTextContent());
+                if (((DocumentType)n).getTextContent() != null) {
+                    writer.writeDTD(((DocumentType)n).getTextContent());
+                }
             } catch (UnsupportedOperationException ex) {
                 //can we ignore?  DOM writers really don't allow this
                 //as there isn't a way to write a DTD in dom



Mime
View raw message