Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 21013 invoked from network); 27 Dec 2006 15:47:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Dec 2006 15:47:45 -0000 Received: (qmail 93884 invoked by uid 500); 27 Dec 2006 15:47:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 93861 invoked by uid 500); 27 Dec 2006 15:47:52 -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 93852 invoked by uid 99); 27 Dec 2006 15:47:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Dec 2006 07:47:52 -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; Wed, 27 Dec 2006 07:47:44 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 056827142C3 for ; Wed, 27 Dec 2006 07:47:24 -0800 (PST) Message-ID: <27202256.1167234444019.JavaMail.jira@brutus> Date: Wed, 27 Dec 2006 07:47:24 -0800 (PST) From: "sergey krivenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2822) [classlib][swing] javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(null) returns null while RI throws NPE In-Reply-To: <780483.1166629881035.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-2822?page=all ] sergey krivenko updated HARMONY-2822: ------------------------------------- Attachment: Harmony-2822-BasicFileChooserUITest.patch the attached is a patch to the test > [classlib][swing] javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(null) returns null while RI throws NPE > ------------------------------------------------------------------------------------------------------------------ > > Key: HARMONY-2822 > URL: http://issues.apache.org/jira/browse/HARMONY-2822 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Oleg Khaschansky > Priority: Minor > Attachments: Harmony-2822-BasicFileChooserUI.patch, Harmony-2822-BasicFileChooserUITest.patch > > > javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(null) returns null on Harmony while RI throws NPE. > Current implementation of BasicFileChooserUI.installDefaults(JFileChooser fc) simply ignores the parameter, so it doesn't throw this unspecified NPE. I suggest to treat this as a non-bug difference. > The following testcase demonstrates this behavior: > -------------------------------------------------------------------------------------- > import junit.framework.TestCase; > import javax.swing.plaf.basic.BasicFileChooserUI; > import javax.swing.*; > import java.lang.reflect.InvocationTargetException; > public class Test0 extends TestCase { > public void testcase1() { > BasicFileChooserUI jm = new BasicFileChooserUI(null); > java.lang.reflect.Method mt = null; > Class cls = BasicFileChooserUI.class; > try{ > mt = cls.getDeclaredMethod( "installDefaults", JFileChooser.class); > } catch(Exception e) { > e.printStackTrace(); > } > mt.setAccessible(true); > Object[] obj ={null}; > try { > mt.invoke(jm, obj ); > fail("NPE should be thrown"); > } catch ( IllegalAccessException ae) { > ae.printStackTrace(); > } catch ( InvocationTargetException ie) { > } > } > } -- 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