mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-17 13:55:20 +00:00
8025448: Enhance listening events
Reviewed-by: art, skoivu
This commit is contained in:
parent
6c1acc1638
commit
85a24d4abd
@ -27,6 +27,7 @@ package javax.swing.event;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.lang.reflect.Array;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
|
||||
/**
|
||||
* A class that holds a list of EventListeners. A single instance
|
||||
@ -271,7 +272,9 @@ public class EventListenerList implements Serializable {
|
||||
while (null != (listenerTypeOrNull = s.readObject())) {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
EventListener l = (EventListener)s.readObject();
|
||||
add((Class<EventListener>)Class.forName((String)listenerTypeOrNull, true, cl), l);
|
||||
String name = (String) listenerTypeOrNull;
|
||||
ReflectUtil.checkPackageAccess(name);
|
||||
add((Class<EventListener>)Class.forName(name, true, cl), l);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user