Alon Bar-Lev has uploaded a new change for review.

Change subject: utils: LocalConfig: apply defaults also if key is empty
......................................................................

utils: LocalConfig: apply defaults also if key is empty

we use shell notation for configuration file, there is no difference
between missing and empty variable.

Change-Id: Ia71bd03f3a0a73af02a4543706815e58489a1396
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/54/25054/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java
index ad1627a..9005d38 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java
@@ -346,7 +346,7 @@
 
         // Get the text of the property and convert it to lowercase:
         String value = getProperty(key, defaultValue != null);
-        if (value == null) {
+        if (StringUtils.isEmpty(value)) {
             ret = defaultValue.booleanValue();
         }
         else {
@@ -403,7 +403,7 @@
         int ret;
 
         String value = getProperty(key, defaultValue != null);
-        if (value == null) {
+        if (StringUtils.isEmpty(value)) {
             ret = defaultValue.intValue();
         }
         else {
@@ -449,7 +449,7 @@
         long ret;
 
         String value = getProperty(key, defaultValue != null);
-        if (value == null) {
+        if (StringUtils.isEmpty(value)) {
             ret = defaultValue.intValue();
         }
         else {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia71bd03f3a0a73af02a4543706815e58489a1396
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to