You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/10/08 19:21:52 UTC

svn commit: r582897 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java

Author: dkulp
Date: Mon Oct  8 10:21:51 2007
New Revision: 582897

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

........
  r579093 | ningjiang | 2007-09-25 02:48:50 -0400 (Tue, 25 Sep 2007) | 1 line
  
  CXF-1059 applied the patch for NodeDataReader, thanks Fedor
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java

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

Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java?rev=582897&r1=582896&r2=582897&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java Mon Oct  8 10:21:51 2007
@@ -19,6 +19,7 @@
 package org.apache.cxf.databinding.source;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.Collection;
 import java.util.logging.Logger;
 
@@ -63,11 +64,12 @@
             }
         } else if (StreamSource.class.isAssignableFrom(type)) {
             try {
-                CachedOutputStream out = new CachedOutputStream();
+                CachedOutputStream out = new CachedOutputStream();                
                 DOMUtils.writeXml(input, out);
+                InputStream is = out.getInputStream();
                 out.close();
                 
-                return new StreamSource(out.getInputStream());
+                return new StreamSource(is);
             } catch (IOException e) {
                 throw new Fault(new Message("COULD_NOT_READ_XML_STREAM", LOG), e);
             } catch (TransformerException e) {