Change in ovirt-engine[master]: core: Version.Op[In]Equality in UpdateStoragePool

amureini at redhat.com amureini at redhat.com
Wed Nov 20 12:54:10 UTC 2013


Allon Mureinik has submitted this change and it was merged.

Change subject: core: Version.Op[In]Equality in UpdateStoragePool
......................................................................


core: Version.Op[In]Equality in UpdateStoragePool

Replaced calls to Version.OpEquality and Version.OpInequality with
version.equals(version2), as it's the standard Java way of doing
things, and is easier to read.

This can be done since oldSpmVersion is known to be not null be the
following logic:
1. It's retrieved from _oldStoragePool, which is assumed to be
   not-null under the CURRENT implementation.
2. This member is retrieved from the database, where the storage_pool
   table has a NOT NULL constraint on the compatibility_version
    column.

note that this also  has a slight theoretical performance benefit, as
nullability is no longer checked on the first operand, but it's
doubtful that this will be be noticeable.

Change-Id: Id36fc037c3597bb01c041850c4eb231a366f79da
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id36fc037c3597bb01c041850c4eb231a366f79da
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list