fix bundles reset to default
[nikiroo-utils.git] / src / be / nikiroo / utils / resources / Bundle.java
index 68c236fa108e7f54d842775d408607f7e2a7551c..5139287fa5c46fcf824fc73f901cb11bbebc326b 100644 (file)
@@ -143,7 +143,8 @@ public class Bundle<E extends Enum<E>> {
        /**
         * Return the value associated to the given id as a {@link String}.
         * <p>
-        * If no value is associated, take the default one if any.
+        * If no value is associated (or if it is empty!), take the default one if
+        * any.
         * 
         * @param id
         *            the id of the value to get
@@ -168,7 +169,6 @@ public class Bundle<E extends Enum<E>> {
                        }
                }
 
-               //TODO: is it ok? need to jDoc?
                if (rep == null || rep.isEmpty()) {
                        return def;
                }
@@ -1167,7 +1167,7 @@ public class Bundle<E extends Enum<E>> {
        }
 
        /**
-        * Reset the backing map to the content of the given bundle, or with default
+        * Reset the backing map to the content of the given bundle, or with NULL
         * values if bundle is NULL.
         * 
         * @param bundle
@@ -1185,7 +1185,7 @@ public class Bundle<E extends Enum<E>> {
                                        if (bundle != null) {
                                                value = bundle.getString(id.name());
                                        } else {
-                                               value = meta.def();
+                                               value = null;
                                        }
 
                                        this.map.put(id.name(), value == null ? null : value.trim());