Alissa Bonas has uploaded a new change for review.

Change subject: core: fix overriding placeholder val in audit log
......................................................................

core: fix overriding placeholder val in audit log

Fix overriding placeholder value set in AugitLogableBase.customValues
with empty string in TypeCompat.
In cases when the value of a placeholder was already populated with
custom value,
no need to invoke a method to try populate it again since in some cases
an empty string returns causing the override of already set non empty value.

Example where bug is shown - storagePoolName is displayed as unknown.
"Host cannot access one of the Storage Domains attached to the Data
Center <UNKNOWN>. Setting Host state to Non-Operational."

Change-Id: I4239085d0bd0246369e93e38a394ab8306c05887
Signed-off-by: Alissa Bonas <abo...@redhat.com>
---
M 
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/backendcompat/TypeCompat.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/91/13691/1

diff --git 
a/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/backendcompat/TypeCompat.java
 
b/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/backendcompat/TypeCompat.java
index 981f2da..0142eea 100644
--- 
a/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/backendcompat/TypeCompat.java
+++ 
b/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/backendcompat/TypeCompat.java
@@ -44,7 +44,7 @@
             int hitCount = 0;
             for (PropertyDescriptor pd : pds) {
                 String propertyName = pd.getName().toLowerCase();
-                if (properties.contains(propertyName)) {
+                if (properties.contains(propertyName) && 
!values.containsKey(propertyName)) {
                     Object value = null;
                     hitCount++;
                     try {


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

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

Reply via email to