Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 55300 invoked from network); 15 Jan 2007 17:17:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2007 17:17:49 -0000 Received: (qmail 12616 invoked by uid 500); 15 Jan 2007 17:17:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 12590 invoked by uid 500); 15 Jan 2007 17:17: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 12547 invoked by uid 99); 15 Jan 2007 17:17:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2007 09:17: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; Mon, 15 Jan 2007 09:17:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D789F7142BD for ; Mon, 15 Jan 2007 09:17:27 -0800 (PST) Message-ID: <17227830.1168881447880.JavaMail.jira@brutus> Date: Mon, 15 Jan 2007 09:17:27 -0800 (PST) From: "Mark Hindess (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_12464869 ] Mark Hindess commented on HARMONY-2903: --------------------------------------- I tried applying the test patch but it fails before getting to the new part. I fails on the line: assertEquals(icon11, icon12); > [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 > Priority: Minor > Attachments: Harmony-2903-Make.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