cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/7] git commit: Make sure we don't create an XMLStreamReader if there isn't an XMLReader
Date Wed, 26 Mar 2014 21:12:49 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/ee79134a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ee79134a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ee79134a

Branch: refs/heads/master
Commit: ee79134a99039c9aaa493b15af039aec9ee57b02
Parents: 1f3f94b
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Mar 26 15:35:12 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Mar 26 15:35:12 2014 -0400

----------------------------------------------------------------------
 core/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/ee79134a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
index a8ca8e0..dae459b 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/core/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