mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
added Error Prone (https://errorprone.info/) and fixed reported errors and warnings
- CI runs Error Prone with Java 11 - use Gradle task `errorprone` to run it on development machine - fixes are mostly cosmetic except: - use Locale.ENGLISH for String.toLowerCase() - use explicit character encoding when reading/writing files - TabbedPane: wrong logic in mouse-wheel scrolling - SplitPane: simplified property change listener (fixes hiding field `propertyChangeListener` of superclass)
This commit is contained in:
@@ -46,6 +46,6 @@ public class FlatLafThemeEditor
|
||||
System.setProperty( "apple.awt.application.appearance", "system" );
|
||||
}
|
||||
|
||||
FlatThemeFileEditor.main( args );
|
||||
FlatThemeFileEditor.launch( args );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ class FlatThemeEditorOverlay
|
||||
private Font font;
|
||||
private Font baseFont;
|
||||
|
||||
@SuppressWarnings( "FormatString" ) // Error Prone
|
||||
@Override
|
||||
public void paint( Graphics g, JComponent c ) {
|
||||
// paint the syntax text area
|
||||
|
||||
@@ -102,7 +102,7 @@ class FlatThemeFileEditor
|
||||
private final FlatThemePropertiesBaseManager propertiesBaseManager = new FlatThemePropertiesBaseManager();
|
||||
private final JButton newButton;
|
||||
|
||||
static void main( String[] args ) {
|
||||
static void launch( String[] args ) {
|
||||
File dir = (args.length > 0)
|
||||
? new File( args[0] )
|
||||
: null;
|
||||
@@ -1306,7 +1306,7 @@ class FlatThemeFileEditor
|
||||
super.addElement( obj );
|
||||
} else {
|
||||
int index = binarySearch( this, obj, comparator );
|
||||
insertElementAt( obj, (index < 0) ? ((-index)-1) : index );
|
||||
insertElementAt( obj, (index < 0) ? (-index - 1) : index );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user