mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-02-17 17:09:55 +08:00
Suppress compilation warnings (#2243)
* Suppress compilation warnings * update
This commit is contained in:
parent
6cb4d24600
commit
9152550bda
HMCL/src/main/java
moe/mickey/minecraft/skin/fx
org/jackhuang/hmcl/ui
HMCLCore/src/main/java/org/jackhuang/hmcl/auth/yggdrasil
@ -19,6 +19,7 @@ public class SkinTransition extends Transition {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SafeVarargs
|
||||||
public SkinTransition(Duration duration, Function<Double, Double> expression, WritableValue<Number>... observables) {
|
public SkinTransition(Duration duration, Function<Double, Double> expression, WritableValue<Number>... observables) {
|
||||||
setCycleDuration(duration);
|
setCycleDuration(duration);
|
||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
|
@ -39,6 +39,7 @@ import javafx.util.Duration;
|
|||||||
import org.jackhuang.hmcl.ui.FXUtils;
|
import org.jackhuang.hmcl.ui.FXUtils;
|
||||||
import org.jackhuang.hmcl.util.javafx.MappedObservableList;
|
import org.jackhuang.hmcl.util.javafx.MappedObservableList;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class TabHeader extends Control implements TabControl, PageAware {
|
public class TabHeader extends Control implements TabControl, PageAware {
|
||||||
|
|
||||||
public TabHeader(Tab<?>... tabs) {
|
public TabHeader(Tab<?>... tabs) {
|
||||||
|
@ -472,6 +472,7 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void loadVersion(Profile profile, String versionId) {
|
public void loadVersion(Profile profile, String versionId) {
|
||||||
this.profile = profile;
|
this.profile = profile;
|
||||||
this.versionId = versionId;
|
this.versionId = versionId;
|
||||||
@ -555,7 +556,6 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
} else if (javaAutoDeterminedOption.isSelected()) {
|
} else if (javaAutoDeterminedOption.isSelected()) {
|
||||||
versionSetting.setJavaAutoSelected();
|
versionSetting.setJavaAutoSelected();
|
||||||
} else {
|
} else {
|
||||||
//noinspection unchecked
|
|
||||||
versionSetting.setJavaVersion(((Pair<JavaVersionType, JavaVersion>) newValue.getUserData()).getValue());
|
versionSetting.setJavaVersion(((Pair<JavaVersionType, JavaVersion>) newValue.getUserData()).getValue());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -84,6 +84,7 @@ public class YggdrasilSession {
|
|||||||
String name = tryCast(storage.get("displayName"), String.class).orElseThrow(() -> new IllegalArgumentException("displayName is missing"));
|
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 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"));
|
String accessToken = tryCast(storage.get("accessToken"), String.class).orElseThrow(() -> new IllegalArgumentException("accessToken is missing"));
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, String> userProperties = tryCast(storage.get("userProperties"), Map.class).orElse(null);
|
Map<String, String> userProperties = tryCast(storage.get("userProperties"), Map.class).orElse(null);
|
||||||
return new YggdrasilSession(clientToken, accessToken, new GameProfile(uuid, name), null, userProperties);
|
return new YggdrasilSession(clientToken, accessToken, new GameProfile(uuid, name), null, userProperties);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user