提交 ae091499 编写于 作者: A alexsch

7166409: bug4331515.java fail with NullPointerException on ubuntu10.04-x86 for JDK8

Reviewed-by: serb
上级 06fec479
......@@ -2619,13 +2619,15 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
private static class FocusColorProperty extends DesktopProperty {
public FocusColorProperty () {
// Fallback value is never used bacause of the configureValue method doesn't return null
// Fallback value is never used because of the configureValue method doesn't return null
super("win.3d.backgroundColor", Color.BLACK);
}
@Override
protected Object configureValue(Object value) {
if (! ((Boolean)Toolkit.getDefaultToolkit().getDesktopProperty("win.highContrast.on")).booleanValue()){
Object highContrastOn = Toolkit.getDefaultToolkit().
getDesktopProperty("win.highContrast.on");
if (highContrastOn == null || !((Boolean) highContrastOn).booleanValue()) {
return Color.BLACK;
}
return Color.BLACK.equals(value) ? Color.WHITE : Color.BLACK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册