UI defaults inspector: avoid NPE if DerivedColorKeys.properties missing

This commit is contained in:
Karl Tauber
2021-09-15 19:44:09 +02:00
parent 161ee090a8
commit eb62a3dc17

View File

@@ -381,7 +381,8 @@ public class FlatUIDefaultsInspector
String name = "/com/formdev/flatlaf/extras/resources/DerivedColorKeys.properties";
Properties properties = new Properties();
try( InputStream in = getClass().getResourceAsStream( name ) ) {
properties.load( in );
if( in != null )
properties.load( in );
} catch( IOException ex ) {
LoggingFacade.INSTANCE.logSevere( "FlatLaf: Failed to load '" + name + "'.", ex );
}