You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/06/21 19:05:35 UTC

[jira] Resolved: (HARMONY-4217) [classlib][awt] ExceptionInInitializerError is thrown if call certain method like getFontName() on a Font object

     [ https://issues.apache.org/jira/browse/HARMONY-4217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko resolved HARMONY-4217.
--------------------------------------

    Resolution: Fixed

The patch has been applied.
Please verify.

> [classlib][awt] ExceptionInInitializerError is thrown if call certain method like getFontName() on a Font object
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4217
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4217
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Elena Sayapina
>            Assignee: Alexey Petrenko
>         Attachments: H-4217.patch, H-4217.patch
>
>
> java.awt.Font(name, style, size) looks erroneous.
> ExceptionInInitializerError is thrown if call some method like getFontName() on just created Font object.
> Please, use the following test to reproduce the failure:
> import java.awt.Font;
> public class CFontTest {
>     public static void main(String[] args) {
>         try {
>             Font f = new Font ("Arial", 0, 10);
>             System.out.println("TEST PASSED: " + f.getFontName());
>         } catch (Throwable e) {
>             e.printStackTrace();
>             System.out.println("TEST FAILED");
>         }
>     }
> }
> Output on Harmony-r548255:
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
> as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r548255, (Jun 18 2007), Windows/ia32/msvc 1310, release build
> http://harmony.apache.org
> java.lang.ExceptionInInitializerError
>         at java.awt.Font.getPeer(Font.java:865)
>         at java.awt.Font.getFontName(Font.java:614)
>         at CFontTest.main(CFontTest.java:8)
> Caused by: java.lang.NullPointerException
>         at org.apache.harmony.awt.gl.font.FontManager.<clinit>(FontManager.java:245)
>         at java.awt.Font.getPeer(Font.java:865)
>         ... 2 more
> TEST FAILED
> Output on RI:
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
> TEST PASSED: Arial
> Note that you may change f.getFontName() to f.canDisplay('a') or f.getFamily() result will be the same.
> Test org.apache.harmony.test.func.reg.jit.btest6569.Btest6569  from functional test suite 
> (https://issues.apache.org/jira/browse/HARMONY-3528) fails because of this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.