Skip to content

Commit 2c3f99d

Browse files
committed
8248352: [TEST_BUG] Test test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java can leave frame open
Backport-of: aa38624
1 parent 80972c5 commit 2c3f99d

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -22,9 +22,8 @@
2222
*/
2323

2424
/* @test
25-
* @key headful
2625
* @summary verify Arab Diacritic Positioning
27-
* @bug 8168759
26+
* @bug 8168759 8248352
2827
*/
2928

3029
import java.awt.Font;
@@ -46,19 +45,18 @@ public class ArabicDiacriticTest {
4645
static final String STR1 = "\u0644\u0639\u064e\u0629";
4746
static final String STR2 = "\u0644\u0639\u0629";
4847

49-
static JFrame frame;
5048
static final String FONT = "DejaVu Sans";
5149

52-
public static void main(String args[]) throws Exception {
53-
showText(); // for a human
50+
public static void main(String[] args) throws Exception {
51+
if ((args.length > 0) && (args[0].equals("-show"))) {
52+
showText(); // for a human
53+
}
5454
measureText(); // for the test harness
55-
Thread.sleep(5000);
56-
frame.dispose();
5755
}
5856

5957
static void showText() {
6058
SwingUtilities.invokeLater(() -> {
61-
frame = new JFrame();
59+
JFrame frame = new JFrame();
6260
JLabel label = new JLabel(SAMPLE);
6361
Font font = new Font(FONT, Font.PLAIN, 36);
6462
label.setFont(font);

0 commit comments

Comments
 (0)