From: Jakub Toth Date: Wed, 30 Aug 2017 08:56:58 +0000 (+0200) Subject: Bug 9056 - Class FileModuleShardConfigProvider does not load X-Git-Tag: release/oxygen~122 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=c84cffb9baa8f86f3decd6fa6de2a5e3a2688381;hp=dc98f9b21ea6e5319e021e52fc30b390149b9b67 Bug 9056 - Class FileModuleShardConfigProvider does not load configurations from classpath properly Change-Id: If1be5fa92eb98a91266353ece8ccc9cadf27c22e Signed-off-by: Jakub Toth --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/FileModuleShardConfigProvider.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/FileModuleShardConfigProvider.java index a2df91b1ba..3f65b59b73 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/FileModuleShardConfigProvider.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/FileModuleShardConfigProvider.java @@ -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 moduleConfigMap = readModuleShardsConfig(moduleShardsConfig);