commit | f5309b94b6e61b86e33933b161e373e627ecb43c | [log] [tgz] |
---|---|---|
author | Ardo Septama <aseptama@gmail.com> | Wed Nov 22 11:49:08 2017 +0100 |
committer | Ardo Septama <aseptama@gmail.com> | Wed Dec 13 11:00:28 2017 +0100 |
tree | 612986d4b46344a1d311254f046132adf653342c | |
parent | 98ac769d630b8d152bf742a05e93d671c3d71d67 [diff] |
Change equality comparison for consistency Although current method will work for small number, when Gerrit version reaches big enough number (e.g. 1000 or to be precise 129 for this case) then this will not work anymore. Change-Id: I2b9b195d828eb3096e3e83cf18cdf5548df45580 Signed-off-by: Ardo Septama <aseptama@gmail.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/importer/GerritApi.java b/src/main/java/com/googlesource/gerrit/plugins/importer/GerritApi.java index cbfc5df..ef1c1a6 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/importer/GerritApi.java +++ b/src/main/java/com/googlesource/gerrit/plugins/importer/GerritApi.java
@@ -111,7 +111,7 @@ // either of the compared version is not valid return -1; } - if (major == o.major) { + if (Objects.equal(major, o.major)) { if (Objects.equal(minor, o.minor)) { if (Objects.equal(patch, o.patch)) { return 0;