Skip to content

Commit db750ff

Browse files
committed
8320349: Simplify FileChooserSymLinkTest.java by using single-window testUI
Backport-of: b1cb37432a4b4a10ba68f468e4d988f2a935f198
1 parent dc53669 commit db750ff

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@
2222
*/
2323

2424
import java.awt.BorderLayout;
25-
import java.awt.Window;
2625
import java.awt.event.ActionEvent;
2726
import java.awt.event.ActionListener;
2827
import java.beans.PropertyChangeEvent;
2928
import java.beans.PropertyChangeListener;
3029
import java.io.File;
3130
import java.util.Arrays;
32-
import java.util.List;
3331

3432
import javax.swing.JCheckBox;
3533
import javax.swing.JFileChooser;
@@ -118,7 +116,7 @@ public static void main(String[] args) throws Exception {
118116
.awaitAndCheck();
119117
}
120118

121-
private static List<Window> createTestUI() {
119+
private static JFrame createTestUI() {
122120
frame = new JFrame("JFileChooser Symbolic Link test");
123121
panel = new JPanel(new BorderLayout());
124122
multiSelection = new JCheckBox("Enable Multi-Selection");
@@ -159,6 +157,6 @@ public void propertyChange(PropertyChangeEvent evt) {
159157
frame.add(panel, BorderLayout.NORTH);
160158
frame.add(jfc, BorderLayout.CENTER);
161159
frame.pack();
162-
return List.of(frame);
160+
return frame;
163161
}
164162
}

0 commit comments

Comments
 (0)