diff --git a/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/GNOMEImpl.java b/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/GNOMEImpl.java index 6bf377a7cf..b453efe2cf 100644 --- a/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/GNOMEImpl.java +++ b/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/GNOMEImpl.java @@ -1,10 +1,11 @@ package net.caffeinemc.mods.sodium.desktop.utils.browse; import java.io.IOException; +import java.util.Objects; class GNOMEImpl implements BrowseUrlHandler { public static boolean isSupported() { - return XDGImpl.isSupported() && System.getenv("XDG_CURRENT_DESKTOP").equals("GNOME"); + return XDGImpl.isSupported() && Objects.equals(System.getenv("XDG_CURRENT_DESKTOP"), "GNOME"); } @Override diff --git a/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/KDEImpl.java b/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/KDEImpl.java index d62412fdd1..61fb07d037 100644 --- a/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/KDEImpl.java +++ b/src/desktop/java/net/caffeinemc/mods/sodium/desktop/utils/browse/KDEImpl.java @@ -1,10 +1,11 @@ package net.caffeinemc.mods.sodium.desktop.utils.browse; import java.io.IOException; +import java.util.Objects; class KDEImpl implements BrowseUrlHandler { public static boolean isSupported() { - return XDGImpl.isSupported() && System.getenv("XDG_CURRENT_DESKTOP").equals("KDE"); + return XDGImpl.isSupported() && Objects.equals(System.getenv("XDG_CURRENT_DESKTOP"), "KDE"); } @Override