You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2011/02/12 08:13:36 UTC

svn commit: r1070037 - in /cxf/branches/2.3.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java

Author: ningjiang
Date: Sat Feb 12 07:13:36 2011
New Revision: 1070037

URL: http://svn.apache.org/viewvc?rev=1070037&view=rev
Log:
Merged revisions 1070034 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1070034 | ningjiang | 2011-02-12 14:52:54 +0800 (Sat, 12 Feb 2011) | 1 line
  
  CXF-3332 Fixed the issue of SourceDataBinding doesn't create a thread safe DataReader.
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 12 07:13:36 2011
@@ -1 +1 @@
-/cxf/trunk:1068320,1068337,1068525,1068867,1068877,1069130,1069138,1069249,1069318,1069492,1069500,1069716,1069720,1069814
+/cxf/trunk:1068320,1068337,1068525,1068867,1068877,1069130,1069138,1069249,1069318,1069492,1069500,1069716,1069720,1069814,1070034

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java?rev=1070037&r1=1070036&r2=1070037&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java (original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/SourceDataBinding.java Sat Feb 12 07:13:36 2011
@@ -35,18 +35,8 @@ public class SourceDataBinding extends o
     
     public static final String PREFERRED_FORMAT = "source-preferred-format";
 
-    private XMLStreamDataReader xsrReader;
-    private XMLStreamDataWriter xswWriter;
-    private NodeDataWriter nodeWriter;
-    private NodeDataReader nodeReader;
-
     public SourceDataBinding() {
         super();
-        this.xsrReader = new XMLStreamDataReader();
-        this.xswWriter = new XMLStreamDataWriter();
-
-        this.nodeReader = new NodeDataReader();
-        this.nodeWriter = new NodeDataWriter();
     }
 
     public void initialize(Service service) {
@@ -57,9 +47,9 @@ public class SourceDataBinding extends o
     @SuppressWarnings("unchecked")
     public <T> DataReader<T> createReader(Class<T> cls) {
         if (cls == XMLStreamReader.class) {
-            return (DataReader<T>) xsrReader;
+            return (DataReader<T>) new XMLStreamDataReader();
         } else if (cls == Node.class) {
-            return (DataReader<T>) nodeReader;
+            return (DataReader<T>) new NodeDataReader();
         } else {
             throw new UnsupportedOperationException("The type " + cls.getName() + " is not supported.");
         }
@@ -72,9 +62,9 @@ public class SourceDataBinding extends o
     @SuppressWarnings("unchecked")
     public <T> DataWriter<T> createWriter(Class<T> cls) {
         if (cls == XMLStreamWriter.class) {
-            return (DataWriter<T>) xswWriter;
+            return (DataWriter<T>) new XMLStreamDataWriter();
         } else if (cls == Node.class) {
-            return (DataWriter<T>) nodeWriter;
+            return (DataWriter<T>) new NodeDataWriter();
         } else {
             throw new UnsupportedOperationException("The type " + cls.getName() + " is not supported.");
         }