Laszlo Hornyak 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();
Because the reference it is not modified
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)
Ok.
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);
because in no case should the dot be appended in front of it
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) {
Why should something be dependent on an instance when it does not use any of 
the instance's fields and methods?

Package protection is enough,  maybe some day we will have a junit test.
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>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to