cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1390063 - /cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Tue, 25 Sep 2012 19:16:32 GMT
Author: dkulp
Date: Tue Sep 25 19:16:31 2012
New Revision: 1390063

URL: http://svn.apache.org/viewvc?rev=1390063&view=rev
Log:
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.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1390063&r1=1390062&r2=1390063&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Tue
Sep 25 19:16:31 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() {



Mime
View raw message