mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
FlatDesktop: avoid unnecessary logging if desktop is not supported (e.g. on NixOS with Plasma/KDE desktop)
This commit is contained in:
@@ -14,6 +14,8 @@ FlatLaf Change Log
|
|||||||
- UI defaults inspector: Fixed NPE if color of `FlatLineBorder` is null. Also
|
- UI defaults inspector: Fixed NPE if color of `FlatLineBorder` is null. Also
|
||||||
use `FlatLineBorder` line color as cell background color in "Value" column.
|
use `FlatLineBorder` line color as cell background color in "Value" column.
|
||||||
(PR #1080)
|
(PR #1080)
|
||||||
|
- `FlatDesktop`: Avoid unnecessary logging if desktop is not supported (e.g.
|
||||||
|
on NixOS with Plasma/KDE desktop).
|
||||||
|
|
||||||
|
|
||||||
## 3.7
|
## 3.7
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ public class FlatDesktop
|
|||||||
public static boolean isSupported( Action action ) {
|
public static boolean isSupported( Action action ) {
|
||||||
if( SystemInfo.isJava_9_orLater ) {
|
if( SystemInfo.isJava_9_orLater ) {
|
||||||
try {
|
try {
|
||||||
return Desktop.getDesktop().isSupported( Enum.valueOf( Desktop.Action.class, action.name() ) );
|
return Desktop.isDesktopSupported() &&
|
||||||
|
Desktop.getDesktop().isSupported( Enum.valueOf( Desktop.Action.class, action.name() ) );
|
||||||
} catch( Exception ex ) {
|
} catch( Exception ex ) {
|
||||||
LoggingFacade.INSTANCE.logSevere( null, ex );
|
LoggingFacade.INSTANCE.logSevere( null, ex );
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user