Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 15894 invoked from network); 18 Dec 2006 16:09:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2006 16:09:43 -0000 Received: (qmail 52960 invoked by uid 500); 18 Dec 2006 16:09:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 52931 invoked by uid 500); 18 Dec 2006 16:09:50 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 52922 invoked by uid 99); 18 Dec 2006 16:09:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 08:09:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 08:09:42 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 86B92714289 for ; Mon, 18 Dec 2006 08:09:22 -0800 (PST) Message-ID: <1299882.1166458162549.JavaMail.jira@brutus> Date: Mon, 18 Dec 2006 08:09:22 -0800 (PST) From: "Andrey Pavlenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2527) [classlib][awt]Component.paint method should check if passed parameter in null In-Reply-To: <11084028.1165512921114.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/HARMONY-2527?page=all ] Andrey Pavlenko updated HARMONY-2527: ------------------------------------- Attachment: Container1.patch ContainerRTest1.patch The patch and the regression test are attached. > [classlib][awt]Component.paint method should check if passed parameter in null > ------------------------------------------------------------------------------ > > Key: HARMONY-2527 > URL: http://issues.apache.org/jira/browse/HARMONY-2527 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Nikolay Kuznetsov > Priority: Minor > Attachments: Container1.patch, ContainerRTest1.patch > > > 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