cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r674563 - in /cxf/branches/2.0.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
Date Mon, 07 Jul 2008 17:43:30 GMT
Author: dkulp
Date: Mon Jul  7 10:43:30 2008
New Revision: 674563

URL: http://svn.apache.org/viewvc?rev=674563&view=rev
Log:
Merged revisions 674562 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r674562 | dkulp | 2008-07-07 13:41:51 -0400 (Mon, 07 Jul 2008) | 2 lines
  
  [CXF-1687] Fix to make the fastinfoset versions work correctly.  Get comments and processing
instructions at the start of XML docs to work correctly
........

Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul  7 10:43:30 2008
@@ -1 +1 @@
-/cxf/trunk:673548,674485,674547,674551
+/cxf/trunk:673548,674485,674547,674551,674562

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java?rev=674563&r1=674562&r2=674563&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
(original)
+++ cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
Mon Jul  7 10:43:30 2008
@@ -159,15 +159,27 @@
     }
 
     public void writeComment(String value) throws XMLStreamException {
-        currentNode.appendChild(document.createComment(value));
+        if (currentNode == null) {
+            document.appendChild(document.createComment(value));
+        } else {
+            currentNode.appendChild(document.createComment(value));
+        }
     }
 
     public void writeProcessingInstruction(String target) throws XMLStreamException {
-        currentNode.appendChild(document.createProcessingInstruction(target, null));
+        if (currentNode == null) {
+            document.appendChild(document.createProcessingInstruction(target, null));
+        } else {
+            currentNode.appendChild(document.createProcessingInstruction(target, null));
+        }
     }
 
     public void writeProcessingInstruction(String target, String data) throws XMLStreamException
{
-        currentNode.appendChild(document.createProcessingInstruction(target, data));
+        if (currentNode == null) {
+            document.appendChild(document.createProcessingInstruction(target, data));
+        } else {
+            currentNode.appendChild(document.createProcessingInstruction(target, data));
+        }
     }
 
     public void writeCData(String data) throws XMLStreamException {
@@ -186,11 +198,11 @@
     }
 
     public void writeStartDocument(String version) throws XMLStreamException {
-        writeStartDocument();
+        document.setXmlVersion(version);
     }
 
     public void writeStartDocument(String encoding, String version) throws XMLStreamException
{
-        writeStartDocument();
+        document.setXmlVersion(version);
     }
 
     public void writeCharacters(String text) throws XMLStreamException {



Mime
View raw message