harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elena Sayapina (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4217) [classlib][awt] ExceptionInInitializerError is thrown if call certain method like getFontName() on a Font object
Date Mon, 18 Jun 2007 12:43:26 GMT
[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

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) {
            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

        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

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)


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.

View raw message