Alissa Bonas has posted comments on this change.

Change subject: engine: Version cleanup
......................................................................


Patch Set 1: (4 inline comments)

....................................................
File 
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Version.java
Line 51:         this.revision = revision2;
Line 52:     }
Line 53: 
Line 54:     public String getValue() {
Line 55:         final StringBuilder val = new StringBuilder();
Why making it final?
Line 56: 
Line 57:         if (this.major > -1)
Line 58:             val.append(this.major);
Line 59:         appendVersionComponent(val, this.minor);


Line 53: 
Line 54:     public String getValue() {
Line 55:         final StringBuilder val = new StringBuilder();
Line 56: 
Line 57:         if (this.major > -1)
Please add { } brackets that are relevant for the "if" condition.
Line 58:             val.append(this.major);
Line 59:         appendVersionComponent(val, this.minor);
Line 60:         appendVersionComponent(val, this.build);
Line 61:         appendVersionComponent(val, this.revision);


Line 54:     public String getValue() {
Line 55:         final StringBuilder val = new StringBuilder();
Line 56: 
Line 57:         if (this.major > -1)
Line 58:             val.append(this.major);
Why this is done outside the appendVersionComponent method? the logic looks 
same as other appended version parts.
Line 59:         appendVersionComponent(val, this.minor);
Line 60:         appendVersionComponent(val, this.build);
Line 61:         appendVersionComponent(val, this.revision);
Line 62:         return val.toString();


Line 61:         appendVersionComponent(val, this.revision);
Line 62:         return val.toString();
Line 63:     }
Line 64: 
Line 65:     static void appendVersionComponent(StringBuilder val, int 
versionNumber) {
Is there a reason to make it static? And why isn't it declared as private 
method?
Line 66:         if (versionNumber > -1) {
Line 67:             if (val.length() != 0) {
Line 68:                 val.append(".");
Line 69:             }


--
To view, visit http://gerrit.ovirt.org/12368
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7dba498fa54bae997d08e7457dd53eb60a740199
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to