You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/11/22 19:00:52 UTC

svn commit: r1037804 - in /cxf/branches/2.3.x-fixes: ./ tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java

Author: dkulp
Date: Mon Nov 22 18:00:52 2010
New Revision: 1037804

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

........
  r1037498 | bimargulies | 2010-11-21 11:18:58 -0500 (Sun, 21 Nov 2010) | 1 line
  
  CXF-3143: don't leak proxies
........

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

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

Modified: cxf/branches/2.3.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java?rev=1037804&r1=1037803&r2=1037804&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java (original)
+++ cxf/branches/2.3.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java Mon Nov 22 18:00:52 2010
@@ -81,7 +81,11 @@ public final class SOAPBindingUtil {
 
     public static <T> T getProxy(Class<T> cls, Object obj) {
         InvocationHandler ih = new ExtensionInvocationHandler(obj);
-        Object proxy = Proxy.newProxyInstance(cls.getClassLoader(), new Class[] {cls}, ih);
+        /*
+         * If we put proxies into the loader of the proxied class, they'll just pile up.
+         */
+        Object proxy = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
+                                              new Class[] {cls}, ih);
         return cls.cast(proxy);
     }