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:
Karl Tauber
2023-05-19 22:58:12 +02:00
parent 9d84501bc8
commit 97018df2f9
46 changed files with 167 additions and 86 deletions

View File

@@ -440,9 +440,9 @@ class DemoFrame
Class<? extends LookAndFeel> lafClass = UIManager.getLookAndFeel().getClass();
try {
FlatLaf.setup( lafClass.newInstance() );
FlatLaf.setup( lafClass.getDeclaredConstructor().newInstance() );
FlatLaf.updateUI();
} catch( InstantiationException | IllegalAccessException ex ) {
} catch( Exception ex ) {
LoggingFacade.INSTANCE.logSevere( null, ex );
}
}