You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bi...@apache.org on 2010/11/21 17:18:59 UTC
svn commit: r1037498 -
/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
Author: bimargulies
Date: Sun Nov 21 16:18:58 2010
New Revision: 1037498
URL: http://svn.apache.org/viewvc?rev=1037498&view=rev
Log:
CXF-3143: don't leak proxies
Modified:
cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java?rev=1037498&r1=1037497&r2=1037498&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java Sun Nov 21 16:18:58 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);
}