Skip to content

Commit

Permalink
fix: Remove unitialized variable in LauncherUpdater (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
keturn authored May 2, 2020
1 parent bb559ff commit a790227
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions src/main/java/org/terasology/launcher/updater/LauncherUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ public final class LauncherUpdater {
private final Semver currentVersion;
private final GitHubClient github;

private Path launcherInstallationDirectory;

public LauncherUpdater(TerasologyLauncherVersionInfo currentVersionInfo) {
github = new GitHubClient();
//TODO: might not be valid semver, catch or use Try<..>
Expand Down Expand Up @@ -94,23 +92,16 @@ public boolean showUpdateDialog(Stage parentStage, final GitHubRelease release)
}

private FutureTask<Boolean> getUpdateDialog(Stage parentStage, GitHubRelease release) {
final String infoText = new StringBuilder()
.append(" ")
.append(BundleUtils.getLabel("message_update_current"))
.append(" ")
.append(currentVersion.getValue())
.append(" \n")
.append(" ")
.append(BundleUtils.getLabel("message_update_latest"))
.append(" ")
.append(versionOf(release).getValue())
.append(" \n")
.append(" ")
.append(BundleUtils.getLabel("message_update_installationDirectory"))
.append(" ")
.append(launcherInstallationDirectory.toString())
.append(" ")
.toString();
final String infoText = " " +
BundleUtils.getLabel("message_update_current") +
" " +
currentVersion.getValue() +
" \n" +
" " +
BundleUtils.getLabel("message_update_latest") +
" " +
versionOf(release).getValue() +
" ";

return new FutureTask<>(() -> {
Parent root = BundleUtils.getFXMLLoader("update_dialog").load();
Expand Down

0 comments on commit a790227

Please sign in to comment.