test/jdk/javax/swing/JFileChooser/8080628/bug8080628.java
changeset 49090 82c1fe23c469
parent 47216 71c04702a3d5
equal deleted inserted replaced
49089:149647adb633 49090:82c1fe23c469
     1 /*
     1 /*
     2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    23 
    23 
    24 import java.util.Locale;
    24 import java.util.Locale;
    25 import javax.swing.SwingUtilities;
    25 import javax.swing.SwingUtilities;
    26 import javax.swing.UIManager;
    26 import javax.swing.UIManager;
    27 import javax.swing.UIManager.LookAndFeelInfo;
    27 import javax.swing.UIManager.LookAndFeelInfo;
       
    28 import javax.swing.UnsupportedLookAndFeelException;
    28 
    29 
    29 import sun.swing.SwingUtilities2;
    30 import sun.swing.SwingUtilities2;
    30 
    31 
    31 /*
    32 /*
    32  * @test
    33  * @test
    75 
    76 
    76     private static void runTest() {
    77     private static void runTest() {
    77         try {
    78         try {
    78             LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
    79             LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
    79             for (LookAndFeelInfo info : lafInfo) {
    80             for (LookAndFeelInfo info : lafInfo) {
    80                 UIManager.setLookAndFeel(info.getClassName());
    81                 try {
       
    82                     UIManager.setLookAndFeel(info.getClassName());
       
    83                 } catch (final UnsupportedLookAndFeelException ignored) {
       
    84                     continue;
       
    85                 }
    81 
    86 
    82                 for (Locale locale : LOCALES) {
    87                 for (Locale locale : LOCALES) {
    83                     for (String key : MNEMONIC_KEYS) {
    88                     for (String key : MNEMONIC_KEYS) {
    84                         int mnemonic = SwingUtilities2.getUIDefaultsInt(key, locale);
    89                         int mnemonic = SwingUtilities2.getUIDefaultsInt(key, locale);
    85                         if (mnemonic != 0) {
    90                         if (mnemonic != 0) {