Author: dkulp
Date: Tue Sep 25 19:24:10 2012
New Revision: 1390079

URL: http://svn.apache.org/viewvc?rev=1390079&view=rev
Log:
Merged revisions 1390063 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1390063 | dkulp | 2012-09-25 15:16:31 -0400 (Tue, 25 Sep 2012) | 11 lines

  Merged revisions 1390056 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1390056 | dkulp | 2012-09-25 15:12:04 -0400 (Tue, 25 Sep 2012) | 3 lines

    [CXF-4521] Detect if other Stax Impls are threadsafe
    Patch from Ivan/xuhaihong applied

  ........

........

Modified:
    
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Modified: 
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1390079&r1=1390078&r2=1390079&view=diff
==============================================================================
--- 
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
 (original)
+++ 
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
 Tue Sep 25 19:24:10 2012
@@ -140,16 +140,23 @@ public final class StaxUtils {
             innerElementCountThreshold = -1;
         }
         XMLInputFactory xif = createXMLInputFactory(true);
-        if (!xif.getClass().getName().contains("ctc.wstx")) {
-            xif = null;
+        String xifClassName = xif.getClass().getName();
+        if (xifClassName.contains("ctc.wstx") || 
xifClassName.contains("xml.xlxp")
+                || xifClassName.contains("xml.xlxp2") || 
xifClassName.contains("bea.core")) {
+            SAFE_INPUT_FACTORY = xif;
+        } else {
+            SAFE_INPUT_FACTORY = null;
         }
-        SAFE_INPUT_FACTORY = xif;
         
         XMLOutputFactory xof = XMLOutputFactory.newInstance();
-        if (!xof.getClass().getName().contains("ctc.wstx")) {
-            xof = null;
+        String xofClassName = xof.getClass().getName();
+        if (xofClassName.contains("ctc.wstx") || 
xofClassName.contains("xml.xlxp")
+                || xofClassName.contains("xml.xlxp2") || 
xofClassName.contains("bea.core")) {
+            SAFE_OUTPUT_FACTORY = xof;
+        } else {
+            SAFE_OUTPUT_FACTORY = null;
         }
-        SAFE_OUTPUT_FACTORY = xof;
+        
     }
     
     private StaxUtils() {


Reply via email to