Mike Kolesnik has uploaded a new change for review.

Change subject: tools: Fix engine-config description processing
......................................................................

tools: Fix engine-config description processing

The "description" field was being processed by calling "getString" which
would split the string by the delimiter character behind the scenes,
causing only the first string to return.

Now, the string will be rejoined using that delimiter character (padding
is added because the split string is trimmed).

Change-Id: Ieb6bf225b06d0ed8491e3c725daef7bd500b1ae1
Signed-off-by: Mike Kolesnik <[email protected]>
---
M 
backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/47/16547/1

diff --git 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java
 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java
index 6a1730e..9ecd29c 100644
--- 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java
+++ 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java
@@ -57,7 +57,11 @@
             type = "String";
         }
         String[] validValues = configurationAt.getStringArray("validValues");
-        String description = configurationAt.getString("description");
+
+        // Description containing the list delimiter *will* be broken into an 
array, so rejoin it using that delimiter.
+        // We pad the separator because the strings in the array are trimmed 
automatically.
+        String description = 
StringUtils.join(configurationAt.getStringArray("description"),
+                configurationAt.getListDelimiter() + " ");
         String alternateKey = keysConfig.getString("/" + key + "/" + 
"alternateKey");
 
         // If the isReloadable attribute isn't specified - assume it is false


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb6bf225b06d0ed8491e3c725daef7bd500b1ae1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to