harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2848) [classlib][swing] j.s.plaf.metal.MetalLookAndFeel.loadSystemColors() throws unspecified NPE
Date Fri, 22 Dec 2006 12:58:22 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2848?page=all ]

Alexey A. Ivanov updated HARMONY-2848:
--------------------------------------

    Attachment: HTest2848_2.java

And in case where useNative is true, the RI don't follow its spec [1]:
"If this is the native look and feel the initial values for the system color properties are
the same as the SystemColor constants."

[1] http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/plaf/basic/BasicLookAndFeel.html#loadSystemColors(javax.swing.UIDefaults,%20java.lang.String[],%20boolean)


Run HTest2848_2 to convince oneself:
You'll see that RI adds two values to UIDefaults with keys from the array (at even positions)
and values ColorUIResource[r=0,g=0,b=0].

But Harmony doesn't use systemColors parameter at all in this case and adds mapping of symbolic
system color names to their value.
Thus the number of keys in defaults is 26. The values for "aa" and "bb" are null (not put
in the table), and the value for "desktop" key is "java.awt.SystemColor[index=0]".

> [classlib][swing] j.s.plaf.metal.MetalLookAndFeel.loadSystemColors() throws unspecified
NPE
> -------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2848
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2848
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>            Priority: Minor
>         Attachments: HTest2848.java, HTest2848_2.java
>
>
> javax.swing.plaf.metal.MetalLookAndFeel.loadSystemColors() throws unspecified NPE on
Harmony whereas it works silently on Harmony.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message