Tal Nisan has posted comments on this change.
Change subject: ui: DiskModelByAliasComparer: null disk treatment
......................................................................
Patch Set 1: Looks good to me, approved
(2 inline comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
Line 207
Line 208
Line 209
Line 210
Line 211
Priceless...
Line 207: @Override
Line 208: public int compare(DiskModel x, DiskModel y)
Line 209: {
Line 210: String xAlias = x.getDisk() != null ?
Line 211: x.getDisk().getDiskAlias() : "";
Works for me but since we use ternary operator anyway, I think the better
approach will be checking if equals to null instead of is x not equal to null,
I see no sense in the upside down logic..
if x.getDisk() == null ? "" : x.getDisk().getDiskAlias() that is
Just my opinion, nothing obliging ;)
Line 212: String yAlias = y.getDisk() != null ?
Line 213: y.getDisk().getDiskAlias() : "";
Line 214:
Line 215: if (xAlias == null)
--
To view, visit http://gerrit.ovirt.org/12346
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2d060a5b9d87dc3ec7bcc382d90a4f2825ca9a05
Gerrit-PatchSet: 1
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