fix #60 just use getDeclaredConstructor()

This commit is contained in:
Bill Culp
2020-02-11 15:05:22 -08:00
parent 3bf09ee731
commit 00bb13c230

View File

@@ -194,7 +194,7 @@ public abstract class FlatLaf
// use Mac Aqua LaF as base
String aquaLafClassName = "com.apple.laf.AquaLookAndFeel";
try {
base = (BasicLookAndFeel) Class.forName( aquaLafClassName ).getDeclaredConstructors()[0].newInstance();
base = (BasicLookAndFeel) Class.forName( aquaLafClassName ).getDeclaredConstructor().newInstance();
} catch( Exception ex ) {
LOG.log( Level.SEVERE, "FlatLaf: Failed to initialize base look and feel '" + aquaLafClassName + "'.", ex );
throw new IllegalStateException();