Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 64313 invoked from network); 20 Oct 2006 11:13:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Oct 2006 11:13:42 -0000 Received: (qmail 38650 invoked by uid 500); 20 Oct 2006 11:13:41 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 38630 invoked by uid 500); 20 Oct 2006 11:13:41 -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 38619 invoked by uid 99); 20 Oct 2006 11:13:41 -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:13:41 -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:13:40 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9FD88714315 for ; Fri, 20 Oct 2006 04:12:44 -0700 (PDT) Message-ID: <1733027.1161342764567.JavaMail.jira@brutus> Date: Fri, 20 Oct 2006 04:12:44 -0700 (PDT) From: "Mikhail Loenko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Assigned: (HARMONY-1543) [classlib][awt]Compatibility: awt.Font.getFamily(Locale) with null Locale returns family on Harmony and throws NPE on RI In-Reply-To: <11289583.1158924263328.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-1543?page=all ] Mikhail Loenko reassigned HARMONY-1543: --------------------------------------- Assignee: Mikhail Loenko > [classlib][awt]Compatibility: awt.Font.getFamily(Locale) with null Locale returns family on Harmony and throws NPE on RI > ------------------------------------------------------------------------------------------------------------------------ > > Key: HARMONY-1543 > URL: http://issues.apache.org/jira/browse/HARMONY-1543 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Ilya Okomin > Assigned To: Mikhail Loenko > Priority: Minor > Attachments: Harmony-1543-test.patch, Harmony-1543.patch > > > awt.Font.getFamily(Locale) with null Locale parameter returns "Dialog" family name on Harmony and throws NPE on RI. > Note: there is nothing said about Exceptions in the spec. > Next test case passes on RI and fails on Harmony: > ----------------test.java------------------- > import java.awt.*; > import java.awt.font.TextAttribute; > import java.util.*; > 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 fnt = Font.getFont((Map)Collections.EMPTY_MAP); > System.out.println(fnt.getFamily(null)); > 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.15 > 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 > .Dialog > F > Time: 0.37 > There was 1 failure: > 1) testRun(test)junit.framework.AssertionFailedError: NullPointerException expected! > at test.testRun(Test9741_1.java:23) > at java.lang.reflect.VMReflection.invokeMethod() > at test.main(Test9741_1.java:12) > 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