cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r825532 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java
Date Thu, 15 Oct 2009 15:50:11 GMT
Author: dkulp
Date: Thu Oct 15 15:50:11 2009
New Revision: 825532

URL: http://svn.apache.org/viewvc?rev=825532&view=rev
Log:
[CXF-2473] Close XMLStreamReader in StaxDataBinding

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java?rev=825532&r1=825531&r2=825532&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/stax/StaxDataBinding.java Thu
Oct 15 15:50:11 2009
@@ -120,7 +120,9 @@
         public void write(Object obj, XMLStreamWriter writer) {
             try {
                 if (obj instanceof XMLStreamReader) {
-                    StaxUtils.copy((XMLStreamReader) obj, writer);
+                    XMLStreamReader xmlStreamReader = (XMLStreamReader) obj;
+                    StaxUtils.copy(xmlStreamReader, writer);
+                    xmlStreamReader.close();
                 } else if (obj instanceof XMLStreamWriterCallback) {
                     ((XMLStreamWriterCallback) obj).write(writer);
                 } else {



Mime
View raw message