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 2014/04/02 08:26:00 UTC

[04/21] git commit: Make sure we don't create an XMLStreamReader if there isn't an XMLReader

Make sure we don't create an XMLStreamReader if there isn't an XMLReader


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ccf144e0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ccf144e0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ccf144e0

Branch: refs/heads/2.7.x-fixes
Commit: ccf144e0936cae2d5ad32127e2ae016b905532ec
Parents: 9d9c311
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Mar 26 15:35:12 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Apr 2 02:09:28 2014 -0400

----------------------------------------------------------------------
 api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ccf144e0/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java b/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
index a636224..3511139 100644
--- a/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
@@ -1507,7 +1507,10 @@ public final class StaxUtils {
             } else if (source instanceof StaxSource) {
                 return ((StaxSource)source).getXMLStreamReader();
             } else if (source instanceof SAXSource) {
-                return createXMLStreamReader(((SAXSource)source).getInputSource());
+                SAXSource ss = (SAXSource)source;
+                if (ss.getXMLReader() == null) {
+                    return createXMLStreamReader(((SAXSource)source).getInputSource());
+                }
             }
             
             XMLInputFactory factory = getXMLInputFactory();