# HG changeset patch # User Jaroslav Tulach # Date 1458887642 -3600 # Node ID 9eb6379b97f099a0d3cd3010ab7acbd558e214ee # Parent c884e4396eebcbd5dcd5d33b849003d0e43241f3 Prevent NPE on Aqua LaF by explicitly using Metal diff -r c884e4396eeb -r 9eb6379b97f0 samples/trycatchredo/test/org/apidesign/exceptions/trycatchredo/api/IOManagerTest.java --- a/samples/trycatchredo/test/org/apidesign/exceptions/trycatchredo/api/IOManagerTest.java Thu Mar 17 09:17:54 2016 +0100 +++ b/samples/trycatchredo/test/org/apidesign/exceptions/trycatchredo/api/IOManagerTest.java Fri Mar 25 07:34:02 2016 +0100 @@ -7,11 +7,15 @@ import java.net.URL; import javax.swing.Action; import javax.swing.JOptionPane; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.plaf.metal.MetalLookAndFeel; import org.apidesign.exceptions.trycatchredo.usage.QueryStream; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; +import org.junit.BeforeClass; /** * @@ -22,6 +26,11 @@ public IOManagerTest() { } + @BeforeClass + public static void useMetalLaF() throws UnsupportedLookAndFeelException { + UIManager.setLookAndFeel(new MetalLookAndFeel()); + } + @Before public void setUp() { MemoryURL.initialize();