Alissa Bonas has posted comments on this change.

Change subject: core: Don't use EqOp on constants in commons
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdsOperationActionParameters.java
Line 21:     private boolean rebootAfterInstallation = true;
Line 22: 
Line 23:     public VdsOperationActionParameters(VdsStatic vdsStatic, String 
rootPassword) {
Line 24:         super(vdsStatic.getId());
Line 25:         if ("".equals(vdsStatic.getManagmentIp())) {
Same as my comment regarding order of operands in StorageServerConnections
Line 26:             vdsStatic.setManagmentIp(null);
Line 27:         }
Line 28:         _vdsStatic = vdsStatic;
Line 29:         _rootPassword = rootPassword;


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/FenceStatusReturnValue.java
Line 21: 
Line 22:     private String _message;
Line 23: 
Line 24:     public String getMessage() {
Line 25:         return ("done".equalsIgnoreCase(_message.toLowerCase())) ? "" 
: _message;
Not related to your change, but isn't there anywhere some enum instead of using 
hardcoded "done"?
Line 26:     }
Line 27: 
Line 28:     public boolean getIsSucceeded() {
Line 29:         return (StringHelper.isNullOrEmpty(getMessage()));


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java
Line 185:     @Override
Line 186:     public boolean equals(Object obj) {
Line 187:         boolean returnValue = super.equals(obj);
Line 188:         if (!returnValue && obj != null && obj instanceof 
StorageServerConnections) {
Line 189:             returnValue = (!"".equals(getid()) && 
StringHelper.EqOp(getid(), ((StorageServerConnections) obj).getid()));
Side comment - I'd do the opposite operands check : !getid().equals("") - 
because what we're interested to check is if id is an empty string, not if 
empty string is id.
But as I said - matter of style, they both work.
Line 190:         }
Line 191:         return returnValue;
Line 192:     }
Line 193: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id0936f213025c76b8c34df6d447e8067500a9887
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to