Verified Commit 485a296c authored by Daniel Mangold's avatar Daniel Mangold
Browse files

Removed redundant variable

parent a51a31a9
...@@ -270,23 +270,16 @@ public class Utils { ...@@ -270,23 +270,16 @@ public class Utils {
try (BufferedReader remoteReader = new BufferedReader(new StringReader(response.body()))) { try (BufferedReader remoteReader = new BufferedReader(new StringReader(response.body()))) {
Version localVersion = new Version(LOCAL_VERSION), Version localVersion = new Version(LOCAL_VERSION),
remoteVersion = new Version(remoteReader.readLine()); remoteVersion = new Version(remoteReader.readLine());
boolean updatedLocal = false;
if (remoteVersion.isNewerThan(localVersion)) { if (remoteVersion.isNewerThan(localVersion)) {
System.out.println("Update available! Local version: " + localVersion + " -- Remote version: " + remoteVersion); System.out.println("Update available! Local version: " + localVersion + " -- Remote version: " + remoteVersion);
System.out.println("Changelog: " + REPOSITORY_URL + "changelog.txt"); System.out.println("Changelog: " + REPOSITORY_URL + "changelog.txt");
if (AUTO_UPDATE) {
updateLocal(".test_version", ".test_version");
updatedLocal = true;
}
} else } else
System.out.println("Local tests are up to date"); System.out.println("Local tests are up to date");
for ( for (
String line = remoteReader.readLine(); String line = remoteReader.readLine();
(CHECK_HASHES || updatedLocal) && line != null && line.length() != 0; (CHECK_HASHES || (AUTO_UPDATE && remoteVersion.isNewerThan(localVersion))) && line != null && line.length() != 0;
line = remoteReader.readLine() line = remoteReader.readLine()
) { ) {
MessageDigest messageDigest = MessageDigest.getInstance("MD5"); MessageDigest messageDigest = MessageDigest.getInstance("MD5");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment