Allon Mureinik has posted comments on this change.
Change subject: core: Don't use EqOp on constants in commons
......................................................................
Patch Set 2: (2 inline comments)
answered inline comments
....................................................
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;
I sincerely hope there is, and if there isn't there probably should be - but as
noted, not related to this patch.
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()));
This "yoda" style equality is used to avoid NPEs if getId() is null
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