Moti Asayag has posted comments on this change.

Change subject: core: PairQueryable Class
......................................................................


Patch Set 1: (3 inline comments)

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/Pair.java
Line 1: package org.ovirt.engine.core.common.utils;
Line 2: 
Line 3: public class Pair<T, K> {
I'm not sure that the Serializable should be removed as this Pair class is 
being serialized an a member of the PairQueryable.
Line 4:     private T first;
Line 5:     private K second;
Line 6: 
Line 7:     public Pair() {


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/PairQueryable.java
Line 17:         pair = new Pair<T, K>(first, second);
Line 18:     }
Line 19: 
Line 20:     public Pair<T, K> getPair() {
Line 21:         return pair == null ? new Pair<T, K>(null, null) : pair;
I'm not in favour of creating multiple instance of part per each getPair() 
invocation.
Line 22:     }
Line 23: 
Line 24:     public void setPair(Pair<T, K> pair) {
Line 25:         this.pair = pair;


Line 54:         if (this == obj)
Line 55:             return true;
Line 56:         if (obj == null)
Line 57:             return false;
Line 58:         if (getClass() != obj.getClass())
please replace with instanceOf (you can regenerate it in eclipse by checking 
the right options)
Line 59:             return false;
Line 60:         PairQueryable other = (PairQueryable) obj;
Line 61:         if (getPair() == null) {
Line 62:             if (other.getPair() != null)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic26f8c18245eb187a6ee20dcb2b9b9c03c3992bf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Muli Salem <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to