4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 @bug 8041694
26 @summary JFileChooser removes trailing spaces in the selected directory name
27 @author Anton Litvinov
28 @library ../../../../lib/testlibrary
29 @build jdk.testlibrary.OSInfo
30 @run main bug8041694
31 */
32
33 import java.awt.AWTException;
34 import java.awt.Robot;
35 import java.awt.event.KeyEvent;
36 import java.io.File;
37 import java.io.IOException;
38 import java.nio.file.Files;
39 import java.util.concurrent.CountDownLatch;
40 import javax.swing.JFileChooser;
41 import javax.swing.SwingUtilities;
42 import javax.swing.UIManager;
43 import javax.swing.UnsupportedLookAndFeelException;
44 import javax.swing.plaf.metal.MetalLookAndFeel;
45
46 import jdk.testlibrary.OSInfo;
47
48 public class bug8041694 {
49 private static volatile File dir1;
50 private static File dir2;
|
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @key headful
27 * @bug 8041694
28 * @summary JFileChooser removes trailing spaces in the selected directory name
29 * @author Anton Litvinov
30 * @library ../../../../lib/testlibrary
31 * @build jdk.testlibrary.OSInfo
32 * @run main bug8041694
33 */
34
35 import java.awt.AWTException;
36 import java.awt.Robot;
37 import java.awt.event.KeyEvent;
38 import java.io.File;
39 import java.io.IOException;
40 import java.nio.file.Files;
41 import java.util.concurrent.CountDownLatch;
42 import javax.swing.JFileChooser;
43 import javax.swing.SwingUtilities;
44 import javax.swing.UIManager;
45 import javax.swing.UnsupportedLookAndFeelException;
46 import javax.swing.plaf.metal.MetalLookAndFeel;
47
48 import jdk.testlibrary.OSInfo;
49
50 public class bug8041694 {
51 private static volatile File dir1;
52 private static File dir2;
|