Fix #3994: 修复 Controller 未能读取 JAVA_VERSION_TIP 的问题 (#3995)

This commit is contained in:
Burning_TNT 2025-06-12 20:49:55 +08:00 committed by GitHub
parent 3ebe8dce44
commit b72056f7fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -312,15 +312,15 @@ public final class Controllers {
} }
if (JavaRuntime.CURRENT_VERSION < 10) { if (JavaRuntime.CURRENT_VERSION < 10) {
Integer shownTipVersion = null; Number shownTipVersion = null;
try { try {
shownTipVersion = (Integer) config().getShownTips().get(JAVA_VERSION_TIP); shownTipVersion = (Number) config().getShownTips().get(JAVA_VERSION_TIP);
} catch (ClassCastException e) { } catch (ClassCastException e) {
LOG.warning("Invalid type for shown tips key: " + JAVA_VERSION_TIP, e); LOG.warning("Invalid type for shown tips key: " + JAVA_VERSION_TIP, e);
} }
if (shownTipVersion == null || shownTipVersion < 11) { if (shownTipVersion == null || shownTipVersion.intValue() < 11) {
String downloadLink = null; String downloadLink = null;
if (OperatingSystem.CURRENT_OS == OperatingSystem.LINUX && Architecture.SYSTEM_ARCH == Architecture.LOONGARCH64_OW) if (OperatingSystem.CURRENT_OS == OperatingSystem.LINUX && Architecture.SYSTEM_ARCH == Architecture.LOONGARCH64_OW)