提交 31d11eaa 编写于 作者: D denis

7072645: Toolkit.addPropertyChangeListener(name, pcl) throws NPE for null name

Reviewed-by: art
上级 41cc6d56
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册