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