Bug 9056 - Class FileModuleShardConfigProvider does not load 39/62439/3
authorJakub Toth <jakub.toth@pantheon.tech>
Wed, 30 Aug 2017 08:56:58 +0000 (10:56 +0200)
committerJakub Toth <jakub.toth@pantheon.tech>
Wed, 30 Aug 2017 13:46:39 +0000 (13:46 +0000)
configurations from classpath properly

Change-Id: If1be5fa92eb98a91266353ece8ccc9cadf27c22e
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/FileModuleShardConfigProvider.java

index a2df91b..3f65b59 100644 (file)
@@ -47,7 +47,7 @@ public class FileModuleShardConfigProvider implements ModuleShardConfigProvider
             moduleShardsConfig = ConfigFactory.parseFile(moduleShardsFile);
         } else {
             LOG.warn("module shards configuration read from resource");
-            moduleShardsConfig = ConfigFactory.load(moduleShardsFile.getName());
+            moduleShardsConfig = ConfigFactory.load(moduleShardsFile.getPath());
         }
 
         Config modulesConfig = null;
@@ -56,7 +56,7 @@ public class FileModuleShardConfigProvider implements ModuleShardConfigProvider
             modulesConfig = ConfigFactory.parseFile(modulesFile);
         } else {
             LOG.warn("modules configuration read from resource");
-            modulesConfig = ConfigFactory.load(modulesFile.getName());
+            modulesConfig = ConfigFactory.load(modulesFile.getPath());
         }
 
         final Map<String, ModuleConfig.Builder> moduleConfigMap = readModuleShardsConfig(moduleShardsConfig);

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.