diff --git a/launcher/src/main/java/com/skcraft/launcher/model/loader/VersionInfo.java b/launcher/src/main/java/com/skcraft/launcher/model/loader/VersionInfo.java index 7d383bcd0..6b52672a6 100644 --- a/launcher/src/main/java/com/skcraft/launcher/model/loader/VersionInfo.java +++ b/launcher/src/main/java/com/skcraft/launcher/model/loader/VersionInfo.java @@ -14,7 +14,6 @@ import com.skcraft.launcher.model.minecraft.MinecraftArguments; import lombok.Data; -import java.util.ArrayList; import java.util.List; @Data @@ -29,7 +28,6 @@ public class VersionInfo { public void setMinecraftArguments(String argumentString) { MinecraftArguments minecraftArguments = new MinecraftArguments(); - minecraftArguments.setGameArguments(new ArrayList()); for (String arg : Splitter.on(' ').split(argumentString)) { minecraftArguments.getGameArguments().add(new GameArgument(arg)); diff --git a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/MinecraftArguments.java b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/MinecraftArguments.java index 801e2d244..077f7a4f1 100644 --- a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/MinecraftArguments.java +++ b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/MinecraftArguments.java @@ -9,6 +9,7 @@ import com.skcraft.launcher.model.minecraft.mapper.MinecraftArgumentsSerializer; import lombok.Data; +import java.util.ArrayList; import java.util.List; @Data @@ -18,12 +19,12 @@ public class MinecraftArguments { @JsonTypeInfo(use = JsonTypeInfo.Id.NONE) @JsonSerialize(contentUsing = MinecraftArgumentsSerializer.class) @JsonDeserialize(contentUsing = MinecraftArgumentsDeserializer.class) - private List gameArguments; + private List gameArguments = new ArrayList<>(); @JsonProperty("jvm") @JsonTypeInfo(use = JsonTypeInfo.Id.NONE) @JsonSerialize(contentUsing = MinecraftArgumentsSerializer.class) @JsonDeserialize(contentUsing = MinecraftArgumentsDeserializer.class) - private List jvmArguments; + private List jvmArguments = new ArrayList<>(); } diff --git a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/VersionManifest.java b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/VersionManifest.java index dd3cf63c6..f1ffa2e98 100644 --- a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/VersionManifest.java +++ b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/VersionManifest.java @@ -12,7 +12,10 @@ import com.skcraft.launcher.model.loader.SidedData; import lombok.Data; -import java.util.*; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; @Data @JsonIgnoreProperties(ignoreUnknown = true) @@ -50,8 +53,6 @@ public Library findLibrary(String name) { public void setMinecraftArguments(String minecraftArguments) { MinecraftArguments result = new MinecraftArguments(); - result.setGameArguments(new ArrayList()); - result.setJvmArguments(new ArrayList()); for (String arg : Splitter.on(' ').split(minecraftArguments)) { result.getGameArguments().add(new GameArgument(arg));