Fixed a bug that ComponentConfigManager#preSet never affect OSGi configuration.
Change-Id: If94c841142ce4dc5e430f7d639f2c2d22039e90a
diff --git a/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java b/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java
index 507e61f..adb1c4b 100644
--- a/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java
+++ b/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java
@@ -269,10 +269,7 @@
// Stores non-existent property so that loadExistingValues() can load in future.
private void preSet(String componentName, String name, String value) {
try {
- Configuration config = cfgAdmin.getConfiguration(componentName);
- if (config == null) {
- config = cfgAdmin.createFactoryConfiguration(componentName);
- }
+ Configuration config = cfgAdmin.getConfiguration(componentName, null);
Dictionary<String, Object> property = config.getProperties();
if (property == null) {
property = new Hashtable<>();