Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 64491 invoked from network); 20 Oct 2006 11:13:56 -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:56 -0000 Received: (qmail 38982 invoked by uid 500); 20 Oct 2006 11:13:56 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 38946 invoked by uid 500); 20 Oct 2006 11:13:56 -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 38935 invoked by uid 99); 20 Oct 2006 11:13:56 -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:56 -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:55 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7589F714321 for ; Fri, 20 Oct 2006 04:12:50 -0700 (PDT) Message-ID: <11588100.1161342770479.JavaMail.jira@brutus> Date: Fri, 20 Oct 2006 04:12:50 -0700 (PDT) From: "Mikhail Loenko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Assigned: (HARMONY-1549) [classlib][awt]Compatibility: java.awt.Font.getMaxCharBounds() with null FontRenderContext returns bounds on Harmony and throws NPE on RI In-Reply-To: <16047317.1158931286167.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-1549?page=all ] Mikhail Loenko reassigned HARMONY-1549: --------------------------------------- Assignee: Mikhail Loenko > [classlib][awt]Compatibility: java.awt.Font.getMaxCharBounds() with null FontRenderContext returns bounds on Harmony and throws NPE on RI > ----------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1549 > URL: http://issues.apache.org/jira/browse/HARMONY-1549 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Ilya Okomin > Assigned To: Mikhail Loenko > Priority: Minor > Attachments: Harmony-1549-test.patch, Harmony-1549.patch > > > java.awt.Font.getMaxCharBounds() with null FontRenderContext returns bounds 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 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 font = Font.decode("dialog"); > System.out.println(font.getMaxCharBounds(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.401 > 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 > .java.awt.geom.Rectangle2D$Float[x=0.0,y=-12.064453,width=31.97461,height=14.701172] > F > Time: 0.41 > There was 1 failure: > 1) testRun(test)junit.framework.AssertionFailedError: NullPointerException expected! > at test.testRun(test.java:20) > 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