mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57: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:
@@ -279,7 +279,7 @@ public class FlatSVGIcon
|
||||
|
||||
private static synchronized URI loadFromStream( InputStream in ) throws IOException {
|
||||
try( InputStream in2 = in ) {
|
||||
return svgUniverse.loadSVG( in2, "/flatlaf-stream-" + (streamNumber++) );
|
||||
return svgUniverse.loadSVG( in2, "/flatlaf-stream-" + streamNumber++ );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ public class FlatSVGIcon
|
||||
URI uri = this.uri;
|
||||
if( uri == null ) {
|
||||
URL url = getIconURL( name, dark );
|
||||
if( url == null & dark )
|
||||
if( url == null && dark )
|
||||
url = getIconURL( name, false );
|
||||
|
||||
if( url == null ) {
|
||||
|
||||
@@ -770,6 +770,7 @@ public class FlatUIDefaultsInspector
|
||||
return String.valueOf( value );
|
||||
}
|
||||
|
||||
@SuppressWarnings( "FormatString" ) // Error Prone
|
||||
private static String color2hex( Color color ) {
|
||||
int rgb = color.getRGB();
|
||||
boolean hasAlpha = color.getAlpha() != 255;
|
||||
|
||||
Reference in New Issue
Block a user