mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
UIDefaultsLoader: do not add properties with empty values to UI defaults (value was an empty string)
This commit is contained in:
@@ -355,7 +355,7 @@ class UIDefaultsLoader
|
|||||||
value = value.trim();
|
value = value.trim();
|
||||||
|
|
||||||
// null
|
// null
|
||||||
if( value.equals( "null" ) ) {
|
if( value.equals( "null" ) || value.isEmpty() ) {
|
||||||
resultValueType[0] = ValueType.NULL;
|
resultValueType[0] = ValueType.NULL;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ public class TestUIDefaultsLoader
|
|||||||
void parseFonts() {
|
void parseFonts() {
|
||||||
// style
|
// style
|
||||||
UIManager.put( "defaultFont", new Font( Font.DIALOG, Font.PLAIN, 10 ) );
|
UIManager.put( "defaultFont", new Font( Font.DIALOG, Font.PLAIN, 10 ) );
|
||||||
assertFontEquals( Font.DIALOG, Font.PLAIN, 10, "" );
|
|
||||||
assertFontEquals( Font.DIALOG, Font.PLAIN, 10, "normal" );
|
assertFontEquals( Font.DIALOG, Font.PLAIN, 10, "normal" );
|
||||||
assertFontEquals( Font.DIALOG, Font.BOLD, 10, "bold" );
|
assertFontEquals( Font.DIALOG, Font.BOLD, 10, "bold" );
|
||||||
assertFontEquals( Font.DIALOG, Font.ITALIC, 10, "italic" );
|
assertFontEquals( Font.DIALOG, Font.ITALIC, 10, "italic" );
|
||||||
|
|||||||
Reference in New Issue
Block a user