File tree Expand file tree Collapse file tree
HMCL/src/main/java/org/jackhuang/hmcl/setting Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323import javafx .beans .property .*;
2424import javafx .collections .FXCollections ;
2525import javafx .collections .ObservableSet ;
26+ import org .jackhuang .hmcl .util .gson .JsonUtils ;
2627import org .jackhuang .hmcl .util .gson .ObservableSetting ;
2728import org .jetbrains .annotations .NotNullByDefault ;
2829import org .jetbrains .annotations .Nullable ;
@@ -38,9 +39,8 @@ public final class UserSettings extends ObservableSetting {
3839 ///
3940 /// @param json the JSON content to parse
4041 /// @return the parsed settings, or {@code null} when the JSON value is {@code null}
41- @ Nullable
42- public static UserSettings fromJson (String json ) throws JsonParseException {
43- return LauncherSettings .SETTINGS_GSON .fromJson (json , UserSettings .class );
42+ public static @ Nullable UserSettings fromJson (String json ) throws JsonParseException {
43+ return JsonUtils .fromJson (LauncherSettings .SETTINGS_GSON , json , UserSettings .class );
4444 }
4545
4646 /// Creates empty user settings with default values.
You can’t perform that action at this time.
0 commit comments