Yair Zaslavsky has posted comments on this change.

Change subject: aaa: Fixing search to search by authz
......................................................................


Patch Set 5:

(4 comments)

http://gerrit.ovirt.org/#/c/28722/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAAAProfileListQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAAAProfileListQuery.java:

Line 27:         Collections.sort(names, new Comparator<ProfileEntry>() {
Line 28: 
Line 29:             @Override
Line 30:             public int compare(ProfileEntry lhs, ProfileEntry rhs) {
Line 31:                 return lhs.getProfile().compareTo(rhs.getProfile()) == 
0 ?
> I think it should be != 0 rather than == 0 within this ternary operator's c
You're right about the comparisson, sorry for that.
not sure how much i would like to introduce temp variables though.
Line 32:                         lhs.getProfile().compareTo(rhs.getProfile())
Line 33:                         : lhs.getAuthz().compareTo(rhs.getAuthz());
Line 34: 
Line 35:             }


http://gerrit.ovirt.org/#/c/28722/5/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/aaa/ProfileEntry.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/aaa/ProfileEntry.java:

Line 23:     public String getProfile() {
Line 24:         return profile;
Line 25:     }
Line 26: 
Line 27:     public void setProfile(String profile) {
> I think it's better to aim for immutable classes if possible.
but it's serializablle , shouldnt it have setters as well?
Line 28:         this.profile = profile;
Line 29:     }
Line 30: 
Line 31:     public String getAuthz() {


Line 31:     public String getAuthz() {
Line 32:         return authz;
Line 33:     }
Line 34: 
Line 35:     public void setAuthz(String authz) {
see my comment for vojtech - don't i need that for serialization?
Line 36:         this.authz = authz;
Line 37:     }
Line 38: 
Line 39:     public String toString() {


Line 36:         this.authz = authz;
Line 37:     }
Line 38: 
Line 39:     public String toString() {
Line 40:         return profile + " (" + authz + ")"; //$NON-NLS-1$
> I think you're missing //$NON-NLS-2$ for the second String literal ")".
thanks.
Line 41:     }
Line 42: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1867577a900e2c7a815d443b771e2576bd8aea2
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to