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/04 18:13:54 UTC

[2/7] 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/31999f8b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/31999f8b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/31999f8b

Branch: refs/heads/2.6.x-fixes
Commit: 31999f8bf338f3db16201ebb53286c82b932fa2c
Parents: bf410ab
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Mar 26 15:35:12 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Apr 4 12:02:51 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/31999f8b/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 294539b..ebcf989 100644
--- a/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
@@ -1482,7 +1482,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();