diff --git a/HMCL/src/main/java/moe/mickey/minecraft/skin/fx/SkinTransition.java b/HMCL/src/main/java/moe/mickey/minecraft/skin/fx/SkinTransition.java index 29289c8ca..ab6e9514d 100644 --- a/HMCL/src/main/java/moe/mickey/minecraft/skin/fx/SkinTransition.java +++ b/HMCL/src/main/java/moe/mickey/minecraft/skin/fx/SkinTransition.java @@ -19,6 +19,7 @@ public class SkinTransition extends Transition { return count; } + @SafeVarargs public SkinTransition(Duration duration, Function expression, WritableValue... observables) { setCycleDuration(duration); this.expression = expression; diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TabHeader.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TabHeader.java index 84cd620ea..8f1157499 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TabHeader.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TabHeader.java @@ -39,6 +39,7 @@ import javafx.util.Duration; import org.jackhuang.hmcl.ui.FXUtils; import org.jackhuang.hmcl.util.javafx.MappedObservableList; +@SuppressWarnings("deprecation") public class TabHeader extends Control implements TabControl, PageAware { public TabHeader(Tab... tabs) { diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java index 06f375698..89d116c7e 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java @@ -472,6 +472,7 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag } @Override + @SuppressWarnings("unchecked") public void loadVersion(Profile profile, String versionId) { this.profile = profile; this.versionId = versionId; @@ -555,7 +556,6 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag } else if (javaAutoDeterminedOption.isSelected()) { versionSetting.setJavaAutoSelected(); } else { - //noinspection unchecked versionSetting.setJavaVersion(((Pair) newValue.getUserData()).getValue()); } }); diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/yggdrasil/YggdrasilSession.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/yggdrasil/YggdrasilSession.java index f0bf4f8d7..474eae8e4 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/yggdrasil/YggdrasilSession.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/yggdrasil/YggdrasilSession.java @@ -84,6 +84,7 @@ public class YggdrasilSession { String name = tryCast(storage.get("displayName"), String.class).orElseThrow(() -> new IllegalArgumentException("displayName is missing")); String clientToken = tryCast(storage.get("clientToken"), String.class).orElseThrow(() -> new IllegalArgumentException("clientToken is missing")); String accessToken = tryCast(storage.get("accessToken"), String.class).orElseThrow(() -> new IllegalArgumentException("accessToken is missing")); + @SuppressWarnings("unchecked") Map userProperties = tryCast(storage.get("userProperties"), Map.class).orElse(null); return new YggdrasilSession(clientToken, accessToken, new GameProfile(uuid, name), null, userProperties); }