You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NullPointerException on Linux if XDG_CURRENT_DESKTOP is not defined #54
Depending on a Linux system setup, the XDG_CURRENT_DESKTOP environment variable may not be defined. However, this library expects it to be present, using the returned value without checking for null, which results in throwing NullPointerException, which the calling code may not expect and crash with an error like this:
(...)
Caused by: java.lang.NullPointerException: Cannot invoke "String.toLowerCase()" because the return value of "com.jthemedetecor.util.OsInfo.getCurrentLinuxDesktopEnvironmentName()" is null
at launcher//com.jthemedetecor.util.OsInfo.isGnome(OsInfo.java:52)
at launcher//com.jthemedetecor.OsThemeDetector.createDetector(OsThemeDetector.java:62)
at launcher//com.jthemedetecor.OsThemeDetector.getDetector(OsThemeDetector.java:50)
(...)
I think EmptyDetector should be used here, like it is in other unsupported environments.
Slyly noting that JDaybreak inherently does not have this issue as its detection mechanism doesn't use XDG_CURRENT_DESKTOP at all, feel free to give it a spin in the meantime
Activity
WasabiThumb commentedon Sep 2, 2026
Slyly noting that JDaybreak inherently does not have this issue as its detection mechanism doesn't use
XDG_CURRENT_DESKTOPat all, feel free to give it a spin in the meantime