Change in ovirt-engine[master]: engine: Don't use createGuidFromString on literals

amureini at redhat.com amureini at redhat.com
Sun Jun 30 07:53:52 UTC 2013


Allon Mureinik has submitted this change and it was merged.

Change subject: engine: Don't use createGuidFromString on literals
......................................................................


engine: Don't use createGuidFromString on literals

Guid.createGuidFromString(String) and NGuid.createGuidFromString(String)
are utility methods that wrap new Guid(String) and return a default
(null or Guid.Empty) in case the string passed to them is null.

This means that there is no point in using them when working with
hard-coded string literals, and a simple call to new Guid("...") would
suffice.

Change-Id: I79780b701c6d156e0cdef983fb1a29d6c21b7b4e
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/adbroker/InternalBrokerUtils.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterHookCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ReplaceGlusterVolumeBrickCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartRebalanceGlusterVolumeCommandTest.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/EntitiesTest.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/VmDeviceTest.java
M backend/manager/modules/compat/src/test/java/org/ovirt/engine/core/compat/NGuidTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/DiskImageDynamicDAOTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/MultiThreadedDAOTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/QuotaDAOTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmDynamicDAOTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmStaticDAOTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmStatisticsDAOTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterServiceDaoTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/VmNetworkStatisticsDaoTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/provider/ProviderDaoTest.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmApplicationsResource.java
M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/GuidUtilsTest.java
M backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfoTest.java
19 files changed, 48 insertions(+), 49 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79780b701c6d156e0cdef983fb1a29d6c21b7b4e
Gerrit-PatchSet: 2
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: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list