Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 61665 invoked from network); 16 Jan 2007 13:29:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jan 2007 13:29:49 -0000 Received: (qmail 1514 invoked by uid 500); 16 Jan 2007 13:29:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 1491 invoked by uid 500); 16 Jan 2007 13:29:55 -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 1473 invoked by uid 99); 16 Jan 2007 13:29:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jan 2007 05:29:55 -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; Tue, 16 Jan 2007 05:29:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D9A047142BD for ; Tue, 16 Jan 2007 05:29:27 -0800 (PST) Message-ID: <26021467.1168954167888.JavaMail.jira@brutus> Date: Tue, 16 Jan 2007 05:29:27 -0800 (PST) From: "Vasily Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-2903) [classlib][swing] j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE In-Reply-To: <27530680.1167234081047.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 [ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465155 ] Vasily Zakharov commented on HARMONY-2903: ------------------------------------------ Thanks Mark, the patch is fine. > [classlib][swing] j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE > ------------------------------------------------------------------------------------- > > Key: HARMONY-2903 > URL: https://issues.apache.org/jira/browse/HARMONY-2903 > Project: Harmony > Issue Type: Bug > Components: Classlib, Non-bug differences from RI > Reporter: Alexey A. Ivanov > Assigned To: Mark Hindess > Priority: Minor > Attachments: Harmony-2903-Make.patch, Harmony-2903-Test.patch, Harmony-2903-Test.patch, Harmony-2903.patch > > > javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(int) returns non-null icon whereas RI throws NPE: > java.lang.NullPointerException > at sun.swing.DefaultLookup.get(DefaultLookup.java:81) > at javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(BasicOptionPaneUI.java:551) > at Test$TestBasicOptionPaneUI.getIconForType(Test.java:8) > at Test.main(Test.java:14) > Note: if UI is associated with a JOptionPane, then RI returns an icon too and no exception is thrown. > (Add the following line before System.out: > bop.installUI(new JOptionPane()); > ) > ======= Code to Reproduce ======= > import javax.swing.Icon; > import javax.swing.plaf.basic.BasicOptionPaneUI; > public class Test { > private static class TestBasicOptionPaneUI extends BasicOptionPaneUI { > @Override > public Icon getIconForType(int i) { > return super.getIconForType(i); > } > } > public static void main(String[] args) { > TestBasicOptionPaneUI bop = new TestBasicOptionPaneUI(); > System.out.println(bop.getIconForType(0)); > } > } > ======= end of code ======= -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira