Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 84216 invoked from network); 20 Oct 2006 11:44:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Oct 2006 11:44:37 -0000 Received: (qmail 83038 invoked by uid 500); 20 Oct 2006 11:44:36 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 83009 invoked by uid 500); 20 Oct 2006 11:44:36 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 82998 invoked by uid 99); 20 Oct 2006 11:44:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 04:44:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 04:44:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7BB9D71431E for ; Fri, 20 Oct 2006 04:43:39 -0700 (PDT) Message-ID: <17987712.1161344619504.JavaMail.jira@brutus> Date: Fri, 20 Oct 2006 04:43:39 -0700 (PDT) From: "Mikhail Loenko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Resolved: (HARMONY-1546) [classlib][awt]Compatibility: java.awt.Font.getFont() with null system property parameter throws NPE on RI while doesn't on Harmony. In-Reply-To: <23640977.1158929663315.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1546?page=all ] Mikhail Loenko resolved HARMONY-1546. ------------------------------------- Resolution: Fixed applied in revision 466074 Ilya please confirm that it works now > [classlib][awt]Compatibility: java.awt.Font.getFont() with null system property parameter throws NPE on RI while doesn't on Harmony. > ------------------------------------------------------------------------------------------------------------------------------------ > > Key: HARMONY-1546 > URL: http://issues.apache.org/jira/browse/HARMONY-1546 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Ilya Okomin > Assigned To: Mikhail Loenko > Priority: Minor > Attachments: Harmony-1546-test.patch, Harmony-1546.patch > > > java.awt.Font.getFont(String nm) and java.awt.Font.getFont(String nm, Font font) with null system property parameter throws NPE on RI while doesn't on Harmony. Spec says: "Throws NullPointerException - if nm is null." > Next test case passes on RI and fails on Harmony: > ----------------------test.java----------------------- > import java.awt.*; > import junit.framework.TestCase; > public class test extends TestCase { > public static void main(String[] args) { > junit.textui.TestRunner.run(test.class); > } > protected void setUp() throws Exception { > super.setUp(); > } > > public void testRun() { > try{ > Font.getFont((String) null); > fail("NullPointerException expected!"); > } catch (NullPointerException e) { > // expected > } > try{ > Font.getFont((String) null, new Font("dialog", Font.PLAIN, 12)); > fail("NullPointerException expected!"); > } catch (NullPointerException e) { > // expected > } > } > } > ----------------------------------------------- > Output RI: > =========================== > java version "1.5.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) > . > Time: 0.241 > OK (1 test) > Output Harmony: > =========================== > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r431938, (Aug 16 2006), Windows/ia32/msvc 1310, release build > http://incubator.apache.org/harmony > .F > Time: 0.01 > There was 1 failure: > 1) testRun(test)junit.framework.AssertionFailedError: NullPointerException expected! > at test.testRun(test.java:19) > at java.lang.reflect.VMReflection.invokeMethod() > at test.main(test.java:9) > FAILURES!!! > Tests run: 1, Failures: 1, Errors: 0 -- 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