mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 22:47:13 -06:00
UIDefaultsLoader and FlatStylingSupport: explicitly specify throws IllegalArgumentException and improved catching
This commit is contained in:
@@ -50,12 +50,15 @@ public class UIDefaultsLoaderAccessor
|
||||
public static Object NULL = ValueType.NULL;
|
||||
public static Object LAZY = ValueType.LAZY;
|
||||
|
||||
public static String resolveValue( String value, Function<String, String> propertiesGetter ) {
|
||||
public static String resolveValue( String value, Function<String, String> propertiesGetter )
|
||||
throws IllegalArgumentException
|
||||
{
|
||||
return UIDefaultsLoader.resolveValue( value, propertiesGetter );
|
||||
}
|
||||
|
||||
public static Object parseValue( String key, String value, Object[] resultValueType,
|
||||
Function<String, String> resolver )
|
||||
throws IllegalArgumentException
|
||||
{
|
||||
ValueType[] resultValueType2 = new ValueType[1];
|
||||
Object result = UIDefaultsLoader.parseValue( key, value, null,
|
||||
@@ -64,7 +67,9 @@ public class UIDefaultsLoaderAccessor
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int parseColorRGBA( String value ) {
|
||||
public static int parseColorRGBA( String value )
|
||||
throws IllegalArgumentException
|
||||
{
|
||||
return UIDefaultsLoader.parseColorRGBA( value );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ class FlatSyntaxTextAreaActions
|
||||
dialog.setVisible( true );
|
||||
|
||||
lastLocation = dialog.getLocation();
|
||||
} catch( BadLocationException | IndexOutOfBoundsException | NumberFormatException ex ) {
|
||||
} catch( BadLocationException | IndexOutOfBoundsException | IllegalArgumentException ex ) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,9 @@ class FlatThemePropertiesSupport
|
||||
this.basePropertyProvider = basePropertyProvider;
|
||||
}
|
||||
|
||||
private String resolveValue( String value ) {
|
||||
private String resolveValue( String value )
|
||||
throws IllegalArgumentException
|
||||
{
|
||||
return UIDefaultsLoaderAccessor.resolveValue( value, propertiesGetter );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user