summaryrefslogtreecommitdiffstats
path: root/sched
diff options
context:
space:
mode:
Diffstat (limited to 'sched')
-rw-r--r--sched/src/com/android/sched/util/config/AsapConfigBuilder.java3
-rw-r--r--sched/src/com/android/sched/util/config/ConfigChecker.java7
2 files changed, 3 insertions, 7 deletions
diff --git a/sched/src/com/android/sched/util/config/AsapConfigBuilder.java b/sched/src/com/android/sched/util/config/AsapConfigBuilder.java
index 5c623eb2..c0f41760 100644
--- a/sched/src/com/android/sched/util/config/AsapConfigBuilder.java
+++ b/sched/src/com/android/sched/util/config/AsapConfigBuilder.java
@@ -457,7 +457,8 @@ public class AsapConfigBuilder {
PropertyId<?> propertyId = (PropertyId<?>) keyId;
if (!values.containsKey(keyId)) {
- values.put(propertyId, propertyId.getDefaultValue(context));
+ PropertyId<?>.Value defaultValue = propertyId.getDefaultValue(context);
+ values.put(propertyId, defaultValue != null ? defaultValue.duplicate() : null);
locationsByKeyId.put(keyId, defaultLocationsByKeyId.get(keyId));
}
}
diff --git a/sched/src/com/android/sched/util/config/ConfigChecker.java b/sched/src/com/android/sched/util/config/ConfigChecker.java
index dc94c3b9..63a21e5a 100644
--- a/sched/src/com/android/sched/util/config/ConfigChecker.java
+++ b/sched/src/com/android/sched/util/config/ConfigChecker.java
@@ -26,7 +26,6 @@ import com.android.sched.util.location.Location;
import java.util.HashMap;
import java.util.Map;
-import java.util.Map.Entry;
import javax.annotation.Nonnull;
@@ -57,11 +56,7 @@ public class ConfigChecker {
@Nonnull Map<ObjectId<?>, Object> instanceValues,
@Nonnull Map<KeyId<?, ?>, Location> locationsById) {
this.context = context;
- for (Entry<PropertyId<?>, PropertyId<?>.Value> entry : stringValues.entrySet()) {
- this.values.put(entry.getKey(), (entry.getValue() != null) ? entry.getValue().duplicate()
- : null);
- }
-
+ this.values.putAll(stringValues);
this.instances.putAll(instanceValues);
this.locations.putAll(locationsById);
}