SUGGESTED FIX
------- CSS.java -------
172c172
< new Attribute("border-color", null, false);
---
> new Attribute("border-color", "black", false);
202c202
< new Attribute("color", null, true);
---
> new Attribute("color", "black", true);
|
EVALUATION
will work on this bug for the next release
###@###.### 2004-08-18
this bug is a regression introduced by the fix for 4845362
( http://sa.sfbay.sun.com/swing/tiger/4845362.0/ )
conv.parseCssValue(key.getDefaultValue())
Default value for color is null.
stringToColor can not take null and thus NPE
Simple fix could be to assign default value to color.
*** /tmp/geta11725 Wed Sep 8 03:00:38 2004
--- CSS.java Wed Sep 8 02:54:00 2004
***************
*** 199,205 ****
new Attribute("clear", "none", false);
public static final Attribute COLOR =
! new Attribute("color", null, true);
public static final Attribute DISPLAY =
new Attribute("display", "block", false);
--- 199,205 ----
new Attribute("clear", "none", false);
public static final Attribute COLOR =
! new Attribute("color", "black", true);
public static final Attribute DISPLAY =
new Attribute("display", "block", false);
============
Color is not the only attribute with null defalut value. We might have to handle others too.
Reassigning this bug to the fixer of 4845362 ###@###.###
###@###.### 2004-09-08
I suggest specifying "black" as default value for 'color' and 'border-color'.
Default values for 'font-family' and 'text-align' are user agent dependent and should not be hardcoded in CSS. There are many others attributes with null defalut values, but they are composite (like 'border' or 'margin'), and need no default value.
###@###.### 2004-09-08
|