mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-22 08:21:27 +00:00
7072645: Toolkit.addPropertyChangeListener(name, pcl) throws NPE for null name
Reviewed-by: art
This commit is contained in:
parent
c1db9a4de0
commit
2e4089a2c2
@ -1532,6 +1532,10 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
||||
}
|
||||
|
||||
public synchronized void addPropertyChangeListener(String name, PropertyChangeListener pcl) {
|
||||
if (name == null) {
|
||||
// See JavaDoc for the Toolkit.addPropertyChangeListener() method
|
||||
return;
|
||||
}
|
||||
initXSettingsIfNeeded(name);
|
||||
super.addPropertyChangeListener(name, pcl);
|
||||
}
|
||||
|
||||
@ -879,6 +879,10 @@ public class WToolkit extends SunToolkit implements Runnable {
|
||||
}
|
||||
|
||||
public synchronized void addPropertyChangeListener(String name, PropertyChangeListener pcl) {
|
||||
if (name == null) {
|
||||
// See JavaDoc for the Toolkit.addPropertyChangeListener() method
|
||||
return;
|
||||
}
|
||||
if ( WDesktopProperties.isWindowsProperty(name)
|
||||
|| name.startsWith(awtPrefix)
|
||||
|| name.startsWith(dndPrefix))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user