mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
UIDefaultsLoader: check for endless recursion in resolveValue()
This commit is contained in:
@@ -212,6 +212,7 @@ class UIDefaultsLoader
|
||||
|
||||
static String resolveValue( String value, Function<String, String> propertiesGetter ) {
|
||||
value = value.trim();
|
||||
String value0 = value;
|
||||
|
||||
if( value.startsWith( PROPERTY_PREFIX ) )
|
||||
value = value.substring( PROPERTY_PREFIX.length() );
|
||||
@@ -232,6 +233,9 @@ class UIDefaultsLoader
|
||||
throw new IllegalArgumentException( "variable or property '" + value + "' not found" );
|
||||
}
|
||||
|
||||
if( newValue.equals( value0 ) )
|
||||
throw new IllegalArgumentException( "endless recursion in variable or property '" + value + "'" );
|
||||
|
||||
return resolveValue( newValue, propertiesGetter );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user