Yaniv Bronhaim has posted comments on this change.
Change subject: core: Adding RpmVersion utils
......................................................................
Patch Set 7: Code-Review-1
(1 comment)
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/RpmVersionUtils.java
Line 38: {
Line 39: Long result1 = Long.parseLong(comps1[i]);
Line 40: Long result2 = Long.parseLong(comps2[i]);
Line 41: return result1.compareTo(result2);
Line 42: } catch (NumberFormatException ex) {
Actually, I checked it and you're right.. we get -54 from "0".compareTo("fc"18).
If comps1 throws the exception and the second (comps2) is a number, you can
assume that the second is an update, if both are not numbers, you should
compare between them as they both strings.
Line 43: return comps1[i].compareTo(comps2[i]);
Line 44: }
Line 45: }
Line 46: }
--
To view, visit http://gerrit.ovirt.org/18370
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia82d09e755b767f254224c84abd16516592715ac
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches