mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 00:07:12 -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 ) {
|
static String resolveValue( String value, Function<String, String> propertiesGetter ) {
|
||||||
value = value.trim();
|
value = value.trim();
|
||||||
|
String value0 = value;
|
||||||
|
|
||||||
if( value.startsWith( PROPERTY_PREFIX ) )
|
if( value.startsWith( PROPERTY_PREFIX ) )
|
||||||
value = value.substring( PROPERTY_PREFIX.length() );
|
value = value.substring( PROPERTY_PREFIX.length() );
|
||||||
@@ -232,6 +233,9 @@ class UIDefaultsLoader
|
|||||||
throw new IllegalArgumentException( "variable or property '" + value + "' not found" );
|
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 );
|
return resolveValue( newValue, propertiesGetter );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user