test/jdk/javax/swing/JFileChooser/8080628/bug8080628.java
changeset 49090 82c1fe23c469
parent 47216 71c04702a3d5
--- a/test/jdk/javax/swing/JFileChooser/8080628/bug8080628.java	Fri Feb 16 18:27:35 2018 +0530
+++ b/test/jdk/javax/swing/JFileChooser/8080628/bug8080628.java	Fri Feb 16 12:24:38 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 import javax.swing.UIManager.LookAndFeelInfo;
+import javax.swing.UnsupportedLookAndFeelException;
 
 import sun.swing.SwingUtilities2;
 
@@ -77,7 +78,11 @@
         try {
             LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
             for (LookAndFeelInfo info : lafInfo) {
-                UIManager.setLookAndFeel(info.getClassName());
+                try {
+                    UIManager.setLookAndFeel(info.getClassName());
+                } catch (final UnsupportedLookAndFeelException ignored) {
+                    continue;
+                }
 
                 for (Locale locale : LOCALES) {
                     for (String key : MNEMONIC_KEYS) {