Bug 751328 - Logical expression in TemplateListModel could be simplified
Summary: Logical expression in TemplateListModel could be simplified
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: lpeer
QA Contact:
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-04 11:00 UTC by Laszlo Hornyak
Modified: 2013-09-30 23:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-12 10:43:42 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Laszlo Hornyak 2011-11-04 11:00:11 UTC
if (b.getid().equals(a.getid()) && (b.getstatus() == null ? StorageDomainStatus.InActive : b.getstatus()) == StorageDomainStatus.Active)

is equal to

if (b.getid().equals(a.getid()) && (b.getstatus() == StorageDomainStatus.Active))

while

if ((a.getstorage_domain_type() == StorageDomainType.Data || a.getstorage_domain_type() == StorageDomainType.Master) && templateNotExistInAnyDomain_iter && (a.getstatus() == null ? null : a.getstatus()) == StorageDomainStatus.Active)

is equal to

if ((a.getstorage_domain_type() == StorageDomainType.Data || a.getstorage_domain_type() == StorageDomainType.Master) && templateNotExistInAnyDomain_iter && a.getstatus() == StorageDomainStatus.Active)

somewhat shorter and probably more readable.

Comment 1 Itamar Heim 2012-12-12 10:43:42 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.


Note You need to log in before you can comment on or make changes to this bug.