Yaniv Bronhaim has posted comments on this change.
Change subject: core: Adding RpmVersion utils
......................................................................
Patch Set 12: Code-Review+1
(2 comments)
Added minor comments, if you still have any strength to take care of them. But
I don't mind if you'll ignore them.
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/RpmVersionUtils.java
Line 95: int index = 0;
Line 96: int state = 0; //0 - start , 1 - alphabetic, 2 - numeric - 3
other
Line 97: StringBuilder current = new StringBuilder();
Line 98: // The maximum number of segments is the number of characters
in the string
Line 99: while (index < part.length()) {
you didn't change to for loop... but as you like it
Line 100: // The current character is letter
Line 101: if (isLetter(chars[index])) {
Line 102: if (state == 2) {
Line 103: // in case the current state is "numeric"
Line 127: // The character is not a number nor a letter
Line 128: // This means a segment has ended
Line 129: // The segment should be added to the array
Line 130: // and a new buffer should be created
Line 131: if (state == 2 || state == 1 || state == 3) {
also here, could be (state != 0), can save 2 more conditions..
Line 132: comps[arrayIndex++] = current;
Line 133: current = new StringBuilder();
Line 134: }
Line 135: state = 3;
--
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: 12
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