diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2019-08-08 12:56:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-08 12:56:37 +0000 |
commit | f9c6fa669c914aaee3dee13f747c077ed6c17302 (patch) | |
tree | cf7876bd31b82e1ddac1cd1b26d6449a04355990 /bpmn/so-bpmn-infrastructure-common/src/main | |
parent | 23f5c77f144d8f722083a99603975d4f7ca1926c (diff) | |
parent | c9aa0646809f12aeec37e463e7a03b96a2738476 (diff) |
Merge "Fix NoClassDefFoundError for ServicePluginFactory"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main')
-rw-r--r-- | bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java index 1abe1ccc73..579e7b72df 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java @@ -98,12 +98,17 @@ public class ServicePluginFactory { new String[] {VS_MONITORED, VS_UNMONITORED, TS_MONITORED, TS_UNMONITORED}; static { - try (InputStream is = ClassLoader.class.getResourceAsStream("/application.properties")) { - Properties prop = new Properties(); - prop.load(is); - OOF_DEFAULT_ENDPOINT = prop.getProperty("oof.default.endpoint"); - THIRD_SP_DEFAULT_ENDPOINT = prop.getProperty("third.sp.default.endpoint"); - INVENTORY_OSS_DEFAULT_ENDPOINT = prop.getProperty("inventory.oss.default.endpoint"); + try { + InputStream is = ClassLoader.class.getResourceAsStream("/application.properties"); + if (null != is) { + Properties prop = new Properties(); + prop.load(is); + OOF_DEFAULT_ENDPOINT = prop.getProperty("oof.default.endpoint"); + THIRD_SP_DEFAULT_ENDPOINT = prop.getProperty("third.sp.default.endpoint"); + INVENTORY_OSS_DEFAULT_ENDPOINT = prop.getProperty("inventory.oss.default.endpoint"); + } else { + logger.error("Failed to load property file, Either property file is missing or empty!"); + } } catch (IOException e) { logger.error("Failed to load property file!"); } |