cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1419471 - in /cxf/trunk: api/src/main/java/org/apache/cxf/interceptor/transform/TransformInInterceptor.java rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
Date Mon, 10 Dec 2012 14:06:20 GMT
Author: ay
Date: Mon Dec 10 14:06:19 2012
New Revision: 1419471

URL: http://svn.apache.org/viewvc?rev=1419471&view=rev
Log:
[CXF-4690] stax's inTransform feature does not work with a provider's Source based service

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/transform/TransformInInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/transform/TransformInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/transform/TransformInInterceptor.java?rev=1419471&r1=1419470&r2=1419471&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/transform/TransformInInterceptor.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/transform/TransformInInterceptor.java
Mon Dec 10 14:06:19 2012
@@ -79,7 +79,6 @@ public class TransformInInterceptor exte
         XMLStreamReader transformReader = createTransformReaderIfNeeded(reader, is);
         if (transformReader != null) {
             message.setContent(XMLStreamReader.class, transformReader);
-            message.removeContent(InputStream.class);
         }
          
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java?rev=1419471&r1=1419470&r2=1419471&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
Mon Dec 10 14:06:19 2012
@@ -181,31 +181,24 @@ public class XMLStreamDataReader impleme
                 public boolean hasNext() throws XMLStreamException {
                     boolean b = super.hasNext();
                     if (!b && !closed) {
-                        closed = true;
-                        try {
-                            super.close();
-                        } catch (XMLStreamException e) {
-                            //ignore
-                        }
-                        try {
-                            ins.close();
-                        } catch (IOException e) {
-                            //ignore
-                        }
+                        close();
                     }
                     return b;
                 }
 
                 public void close() throws XMLStreamException {
+                    closed = true;
                     try {
                         super.close();
                     }  catch (XMLStreamException e) {
                         //ignore
                     }
-                    try {
-                        ins.close();
-                    }  catch (IOException e) {
-                        //ignore
+                    if (ins != null) {
+                        try {
+                            ins.close();
+                        }  catch (IOException e) {
+                            //ignore
+                        }
                     }
                 }
             };



Mime
View raw message