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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30492
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     1
/*
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     2
 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     4
 *
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     8
 *
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    13
 * accompanied this code).
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    14
 *
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    18
 *
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    21
 * questions.
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    22
 */
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    23
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    24
/*
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    25
 * @test
31889
c79bf6ec3eec 8080953: [TEST_BUG]Test java/awt/FontClass/DebugFonts.java fails due to wrongly typed bugid
pchopra
parents: 30492
diff changeset
    26
 * @bug 4956241 8076979 8080953
30492
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    27
 * @summary NPE debugging fonts
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    28
 * @run main/othervm DebugFonts
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    29
 */
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    30
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    31
import java.awt.Font;
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    32
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    33
public class DebugFonts {
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    34
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    35
   public static void main(String [] args) {
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    36
      System.setProperty("sun.java2d.debugfonts", "true");
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    37
      Font font = new Font("dialog", Font.PLAIN, 14);
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    38
      System.out.println(font);
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    39
      String s1 = font.getFamily();
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    40
      String s2 = font.getFontName();
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    41
   }
d9bee4d93913 8076979: DebugFonts.java fails with stackoverflow error
prr
parents:
diff changeset
    42
}