mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Use Long type for version comparsion
This commit is contained in:
parent
aadeceaf78
commit
8ac36a980c
@ -31,8 +31,8 @@ public class Version {
|
||||
|
||||
int compareLength = Math.min(tokens1.length, tokens2.length);
|
||||
for (int i = 0; i < compareLength; i++) {
|
||||
int version1 = Integer.parseInt(tokens1[i]);
|
||||
int version2 = Integer.parseInt(tokens2[i]);
|
||||
long version1 = Long.parseLong(tokens1[i]);
|
||||
long version2 = Long.parseLong(tokens2[i]);
|
||||
if (version1 != version2) {
|
||||
return version1 < version2 ? -1 : 1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user