mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Merge PR #1087: Fix exception when SVG icon name has no file extension
This commit is contained in:
@@ -524,7 +524,9 @@ public class FlatSVGIcon
|
|||||||
private URL getIconURL( String name, boolean dark ) {
|
private URL getIconURL( String name, boolean dark ) {
|
||||||
if( dark ) {
|
if( dark ) {
|
||||||
int dotIndex = name.lastIndexOf( '.' );
|
int dotIndex = name.lastIndexOf( '.' );
|
||||||
name = name.substring( 0, dotIndex ) + "_dark" + name.substring( dotIndex );
|
name = (dotIndex > 0)
|
||||||
|
? name.substring( 0, dotIndex ) + "_dark" + name.substring( dotIndex )
|
||||||
|
: name + "_dark";
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassLoader cl = (classLoader != null) ? classLoader : FlatSVGIcon.class.getClassLoader();
|
ClassLoader cl = (classLoader != null) ? classLoader : FlatSVGIcon.class.getClassLoader();
|
||||||
|
|||||||
Reference in New Issue
Block a user