cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r654887 - in /cxf/branches/2.0.x-fixes: ./ rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/
Date Fri, 09 May 2008 17:06:14 GMT
Author: dkulp
Date: Fri May  9 10:06:14 2008
New Revision: 654887

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

........
  r654662 | bimargulies | 2008-05-08 21:37:42 -0400 (Thu, 08 May 2008) | 2 lines
  
  Fix to CXF-1569, I think.
........

Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
    cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.aegis.xml
    cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
    cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
    cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java

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

Modified: cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java?rev=654887&r1=654886&r2=654887&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
Fri May  9 10:06:14 2008
@@ -37,7 +37,6 @@
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -70,12 +69,7 @@
         clientInterface = (MapTest)proxyFac.create(); 
     }
     
-    @Ignore
     @Test
-    /**
-     * Until some issues in CXF-1051 are resolved, it's not clear what to test in here. 
-     * 
-     */
     public void testMapWsdl() throws WSDLException {
         @SuppressWarnings("unused")
         //Document wsdl = getWSDLDocument("MapTestService");

Modified: cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.aegis.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.aegis.xml?rev=654887&r1=654886&r2=654887&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.aegis.xml
(original)
+++ cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.aegis.xml
Fri May  9 10:06:14 2008
@@ -20,10 +20,13 @@
 <mappings>
 	<mapping>
 		<method name="getMapStringToLong">
-			<return-type valueType='java.lang.Integer' typeName="mstl"  />
+			<return-type typeName="mstl"  />
+		</method>
+		<method name="getRawMapStringToInteger">
+		  <return-type valueType="java.lang.Integer"/>
 		</method>
 		<method name="getMapLongToString">
-			<return-type typeName="mslt" />
+			<return-type typeName="mlts" />
 		</method>
 	</mapping>
 </mappings>
\ No newline at end of file

Modified: cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java?rev=654887&r1=654886&r2=654887&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
Fri May  9 10:06:14 2008
@@ -34,6 +34,7 @@
     ObjectWithAMap returnObjectWithAMap();
     void takeMap(ObjectWithAMap map);
     Map<String, Long> getMapStringToLong();
+    Map getRawMapStringToInteger();
     Map<Long, String> getMapLongToString();
     
     ObjectWithAMapNs2 returnObjectWithAMapNs2();

Modified: cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java?rev=654887&r1=654886&r2=654887&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
Fri May  9 10:06:14 2008
@@ -61,4 +61,11 @@
     public void takeMapNs2(ObjectWithAMapNs2 map) {
     }
 
+    @SuppressWarnings("unchecked")
+    public Map getRawMapStringToInteger() {
+        Map r = new HashMap();
+        r.put("key", new Integer(12));
+        return r;
+    }
+
 }

Modified: cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=654887&r1=654886&r2=654887&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
Fri May  9 10:06:14 2008
@@ -426,8 +426,10 @@
                 packageLoaders.put(pkgName, jcls.getClassLoader());
                 String objectFactoryClassName = pkgName + "." + "ObjectFactory";
                 Class<?> ofactory = null;
-                CachedClassOrNull cachedFactory = 
-                    OBJECT_FACTORY_CACHE.get(objectFactoryClassName);
+                CachedClassOrNull cachedFactory = null;
+                synchronized (OBJECT_FACTORY_CACHE) {
+                    cachedFactory = OBJECT_FACTORY_CACHE.get(objectFactoryClassName);
+                }
                 if (cachedFactory != null) {
                     ofactory = cachedFactory.getCachedClass();
                 }
@@ -436,11 +438,9 @@
                         ofactory = Class.forName(objectFactoryClassName, false, jcls
                                                  .getClassLoader());
                         objectFactories.add(ofactory);
-                        OBJECT_FACTORY_CACHE.put(objectFactoryClassName, 
-                                                 new CachedClassOrNull(ofactory));
+                        addToObjectFactoryCache(objectFactoryClassName, ofactory);
                     } catch (ClassNotFoundException e) {
-                        OBJECT_FACTORY_CACHE.put(objectFactoryClassName, 
-                                                 new CachedClassOrNull(null));
+                        addToObjectFactoryCache(objectFactoryClassName, null);
                     }
                 } else {
                     objectFactories.add(ofactory);                    
@@ -513,12 +513,19 @@
                 cachedContextAndSchemas = new CachedContextAndSchemas(ctx);
                 JAXBCONTEXT_CACHE.put(classes, cachedContextAndSchemas);
             }
+            cachedContextAndSchemas = JAXBCONTEXT_CACHE.get(classes);
         }
 
-        cachedContextAndSchemas = JAXBCONTEXT_CACHE.get(classes);
         return cachedContextAndSchemas.getContext();
     }
 
+    private void addToObjectFactoryCache(String objectFactoryClassName, Class<?> ofactory)
{
+        synchronized (OBJECT_FACTORY_CACHE) {
+            OBJECT_FACTORY_CACHE.put(objectFactoryClassName, 
+                                     new CachedClassOrNull(ofactory));
+        }
+    }
+
     private void addWsAddressingTypes(Set<Class<?>> classes) {
         if (classes.contains(ObjectFactory.class)) {
             // ws-addressing is used, lets add the specific types



Mime
View raw message