[PERF] Determine whether OS is Windows

Closes #33953

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
Martin Bartoš 2025-02-10 16:31:26 +00:00 committed by GitHub
parent 822eb4471d
commit 491b7861ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -417,7 +417,7 @@ public class NetworkUtils {
return checkForPresence("os.name", "sun");
}
private static boolean checkForWindows() {
public static boolean checkForWindows() {
return checkForPresence("os.name", "win");
}

View File

@ -31,8 +31,8 @@ import java.util.stream.Collectors;
import io.quarkus.runtime.LaunchMode;
import io.smallrye.config.SmallRyeConfig;
import org.apache.commons.lang3.SystemUtils;
import org.keycloak.common.Profile;
import org.keycloak.common.util.NetworkUtils;
import org.keycloak.quarkus.runtime.cli.command.AbstractCommand;
import org.keycloak.quarkus.runtime.configuration.Configuration;
import org.keycloak.quarkus.runtime.configuration.PersistedConfigSource;
@ -140,7 +140,7 @@ public final class Environment {
}
public static boolean isWindows() {
return SystemUtils.IS_OS_WINDOWS;
return NetworkUtils.checkForWindows();
}
public static void forceDevProfile() {