Arik Hadas has uploaded a new change for review.

Change subject: core: add default value for custom properties
......................................................................

core: add default value for custom properties

For some flows the custom properties of VM were not initialized, thus
they could be null. When the VM was edited from the UI, if no custom
properties were set, they were set to empty string. This inconsistency
caused false alarms on checks whether the custom properties were changed
- because a transition from null to empty string was detected as change.

This patch defines empty string as a default value for the custom
properties. It is safe since in all its usages, we check whether the
custom properties is null or empty string.

Change-Id: I74cc88b9bef6ace4a608c6d15f27b9c8f678564d
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/27882/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
index 2ac8d0d..658f648 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
@@ -73,6 +73,7 @@
         vmtGuid = Guid.Empty;
         setNumaTuneMode(NumaTuneMode.PREFERRED);
         vNumaNodeList = new ArrayList<VmNumaNode>();
+        customProperties = "";
     }
 
     public VmStatic(VmStatic vmStatic) {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74cc88b9bef6ace4a608c6d15f27b9c8f678564d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to