From c2cf85b0e21aa464977daa91c42afe38fef701a1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 11 Sep 2019 23:32:49 +0200 Subject: [PATCH] fixed NPE when variable not found --- flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index fcf34164..a8153576 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -222,8 +222,10 @@ public abstract class FlatLaf value = value.substring( REF_PREFIX.length() ); String newValue = properties.getProperty( value ); - if( newValue == null ) + if( newValue == null ) { System.err.println( "variable or reference '" + value + "' not found" ); + throw new IllegalArgumentException( value ); + } return resolveValue( properties, newValue ); }