jdk/test/java/awt/FontClass/DebugFonts.java
author pchopra
Wed, 15 Jul 2015 14:05:09 +0300
changeset 31889 c79bf6ec3eec
parent 30492 d9bee4d93913
permissions -rw-r--r--
8080953: [TEST_BUG]Test java/awt/FontClass/DebugFonts.java fails due to wrongly typed bugid Reviewed-by: azvegint, serb

/*
 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @bug 4956241 8076979 8080953
 * @summary NPE debugging fonts
 * @run main/othervm DebugFonts
 */

import java.awt.Font;

public class DebugFonts {

   public static void main(String [] args) {
      System.setProperty("sun.java2d.debugfonts", "true");
      Font font = new Font("dialog", Font.PLAIN, 14);
      System.out.println(font);
      String s1 = font.getFamily();
      String s2 = font.getFontName();
   }
}