cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [04/21] git commit: Make sure we don't create an XMLStreamReader if there isn't an XMLReader
Date Wed, 02 Apr 2014 06:26:00 GMT
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 <dkulp@apache.org>
Authored: Wed Mar 26 15:35:12 2014 -0400
Committer: Daniel Kulp <dkulp@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();


Mime
View raw message