Explorar el Código

Load proxied listener calls in the correct class loader

This stopped plugins from being able to use awesome listener calls

Change-Id: I31204638628067954611bbd07525ed31bf92baa7
Reviewed-on: http://gerrit.dmdirc.com/2146
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.7rc1
Greg Holmes hace 13 años
padre
commit
2fda4cc842
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      src/com/dmdirc/util/ListenerList.java

+ 2
- 1
src/com/dmdirc/util/ListenerList.java Ver fichero

@@ -138,8 +138,9 @@ public class ListenerList {
138 138
      * @param listenerType The type of listener to be called
139 139
      * @return A proxy instance that can be used to call methods
140 140
      */
141
+    @SuppressWarnings("unchecked")
141 142
     public <T> T getCallable(final Class<T> listenerType) {
142
-        return (T) Proxy.newProxyInstance(getClass().getClassLoader(),
143
+        return (T) Proxy.newProxyInstance(listenerType.getClassLoader(),
143 144
                 new Class[] { listenerType }, new CallHandler<T>(listenerType));
144 145
     }
145 146
 

Loading…
Cancelar
Guardar