harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2587) [classlib][awt]Component.paint method should check if passed parameter in null
Date Mon, 11 Dec 2006 11:08:22 GMT
[classlib][awt]Component.paint method should check if passed parameter in null
------------------------------------------------------------------------------

                 Key: HARMONY-2587
                 URL: http://issues.apache.org/jira/browse/HARMONY-2587
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Nikolay Kuznetsov
            Priority: Minor


RI implementations of paint methods checks if passed Graphics parameter is null. I've found
several bugs[1] in Sun's database indicating activity on adding check to paint methods. In
most of the real cases null value was passed because the component was clipped or invisible(and
it seems to be OK).

[1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4036712
     http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4191142

     Attached test passes on RI and throws NPE on harmony implementation.
     RI
     java test
     true
     true
     true
     true
     true
     true

     Harmony:
     false
     java.lang.NullPointerException
             at java.awt.Container.paintComponentsImpl(Container.java)
        at java.awt.Container.paint(Container.java:930)
        at test.testPaint(test.java:58)
        at test.main(test.java:119)
false
java.lang.NullPointerException
        at java.awt.Container.paintComponentsImpl(Container.java)
        at java.awt.Container.paintComponents(Container.java:977)
        at test.testPaintComponents(test.java:70)
        at test.main(test.java:122)
false
java.lang.NullPointerException
        at java.awt.Container.paintComponentsImpl(Container.java)
        at java.awt.Container.paint(Container.java:930)
        at java.awt.Container.print(Container.java:318)
        at test.testPrint(test.java:82)
        at test.main(test.java:123)
false
java.lang.NullPointerException
        at java.awt.Container.paintComponentsImpl(Container.java)
        at java.awt.Container.paintComponents(Container.java:977)
        at java.awt.Container.printComponents(Container.java:968)
        at test.testPrintComponents(test.java:94)
        at test.main(test.java:124)
false
java.lang.NullPointerException
        at java.awt.Container.paintComponentsImpl(Container.java)
        at java.awt.Container.paint(Container.java:930)
        at java.awt.Component.update(Component.java:3447)
        at java.awt.Container.update(Container.java:339)
        at test.testUpdate(test.java:106)
        at test.main(test.java:125)
false

-- 
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