axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r474881 - /webservices/axis/trunk/java/src/org/apache/axis/encoding/TypeMappingImpl.java
Date Tue, 14 Nov 2006 17:28:15 GMT
Author: gawor
Date: Tue Nov 14 09:28:15 2006
New Revision: 474881

URL: http://svn.apache.org/viewvc?view=rev&rev=474881
Log:
minor change so that under concurrent access things won't loop forever (in hashmap code)

Modified:
    webservices/axis/trunk/java/src/org/apache/axis/encoding/TypeMappingImpl.java

Modified: webservices/axis/trunk/java/src/org/apache/axis/encoding/TypeMappingImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/java/src/org/apache/axis/encoding/TypeMappingImpl.java?view=diff&rev=474881&r1=474880&r2=474881
==============================================================================
--- webservices/axis/trunk/java/src/org/apache/axis/encoding/TypeMappingImpl.java (original)
+++ webservices/axis/trunk/java/src/org/apache/axis/encoding/TypeMappingImpl.java Tue Nov
14 09:28:15 2006
@@ -40,7 +40,9 @@
 
 import java.lang.reflect.Array;
 import java.util.ArrayList;
+import java.util.Map;
 import java.util.HashMap;
+import java.util.Collections;
 import java.util.List;
 import java.io.Serializable;
 
@@ -115,10 +117,10 @@
         }
     }
 
-    private HashMap qName2Pair;     // QName to Pair Mapping
-    private HashMap class2Pair;     // Class Name to Pair Mapping
-    private HashMap pair2SF;        // Pair to Serialization Factory
-    private HashMap pair2DF;        // Pair to Deserialization Factory
+    private Map qName2Pair;     // QName to Pair Mapping
+    private Map class2Pair;     // Class Name to Pair Mapping
+    private Map pair2SF;        // Pair to Serialization Factory
+    private Map pair2DF;        // Pair to Deserialization Factory
     private ArrayList namespaces;   // Supported namespaces
 
     protected Boolean doAutoTypes = null;
@@ -127,10 +129,10 @@
      * Construct TypeMapping
      */
     public TypeMappingImpl() {
-        qName2Pair  = new HashMap();
-        class2Pair  = new HashMap();
-        pair2SF     = new HashMap();
-        pair2DF     = new HashMap();
+        qName2Pair  = Collections.synchronizedMap(new HashMap());
+        class2Pair  = Collections.synchronizedMap(new HashMap());
+        pair2SF     = Collections.synchronizedMap(new HashMap());
+        pair2DF     = Collections.synchronizedMap(new HashMap());
         namespaces  = new ArrayList();
     }
 
@@ -779,4 +781,4 @@
         temp.addAll(class2Pair.keySet());
         return (Class[])temp.toArray(new Class[temp.size()]);
     }
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message