Change in ovirt-engine[master]: core: Don't use Version.OpEquality in RunVmCommand

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: Don't use Version.OpEquality in RunVmCommand
......................................................................


core: Don't use Version.OpEquality in RunVmCommand

In all the (three) places Version.OpEquality is used in RunVmCommand, at
least one of the Version's can be deduced to be non-null.
Under these circumstances, using version.equals(version2) is better, as
it's the standard Java way of doing things, and is easier to read.

Also, note it 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: I1e77770ace7f0e6fd06dcea502c427cb202c0f66
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
1 file changed, 4 insertions(+), 5 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e77770ace7f0e6fd06dcea502c427cb202c0f66
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: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list