Procházet zdrojové kódy

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 před 13 roky
rodič
revize
2fda4cc842
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2
    1
      src/com/dmdirc/util/ListenerList.java

+ 2
- 1
src/com/dmdirc/util/ListenerList.java Zobrazit soubor

@@ -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
 

Načítá se…
Zrušit
Uložit