cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1055159 - in /cxf/branches/2.3.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/util/ASMHelper.java
Date Tue, 04 Jan 2011 19:38:21 GMT
Author: dkulp
Date: Tue Jan  4 19:38:21 2011
New Revision: 1055159

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

........
  r1055150 | dkulp | 2011-01-04 14:33:00 -0500 (Tue, 04 Jan 2011) | 2 lines
  
  [CXF-3215] Make sure only one version of each class is attempted to be
  created.
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ASMHelper.java

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

Modified: cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ASMHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ASMHelper.java?rev=1055159&r1=1055158&r2=1055159&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ASMHelper.java
(original)
+++ cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ASMHelper.java
Tue Jan  4 19:38:21 2011
@@ -184,7 +184,13 @@ public class ASMHelper {
     
     public Class<?> loadClass(String className, Class clz , byte[] bytes) { 
         TypeHelperClassLoader loader = getTypeHelperClassLoader(clz);
-        return loader.defineClass(className, bytes);
+        synchronized (loader) {
+            Class<?> cls = loader.lookupDefinedClass(className);
+            if (cls == null) {
+                return loader.defineClass(className, bytes);
+            }
+            return cls;
+        }
     }
     public Class<?> findClass(String className, Class clz) { 
         TypeHelperClassLoader loader = getTypeHelperClassLoader(clz);



Mime
View raw message