Simplifies the version comparator a bit
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
This commit is contained in:
parent
73faa4408e
commit
dc362eb2c8
@ -90,10 +90,8 @@ public final class Updater {
|
||||
for (int i = 0; i < Math.max(oldVersionParts.length, newVersionParts.length); i++) {
|
||||
int oldVersionNumber = oldVersionParts.length > i ? Integer.parseInt(oldVersionParts[i]) : 0;
|
||||
int newVersionNumber = newVersionParts.length > i ? Integer.parseInt(newVersionParts[i]) : 0;
|
||||
if (newVersionNumber > oldVersionNumber) {
|
||||
return true;
|
||||
} else if (newVersionNumber < oldVersionNumber) {
|
||||
return false;
|
||||
if (newVersionNumber != oldVersionNumber) {
|
||||
return newVersionNumber > oldVersionNumber;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user