X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-subscriber%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fsubscriber%2FSubscriberProps.java;h=ba7aa7affcaa1a673216f31f451ef3e1a3271ebf;hb=1c11dffada48c31491f2583f0d28ccecb4b4891b;hp=329c06a5d67e535605b13368ab1497a6ea8b6ebe;hpb=1298e6487340fcb1644c4a0a7e06026d156bdf8f;p=dmaap%2Fdatarouter.git diff --git a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java index 329c06a5..ba7aa7af 100644 --- a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java +++ b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java @@ -34,18 +34,23 @@ public class SubscriberProps { private static Logger subLogger = Logger.getLogger("org.onap.dmaap.datarouter.subscriber.internal"); private Properties properties; - private SubscriberProps(String propsPath) throws IOException{ + private SubscriberProps(String propsPath) throws IOException { properties = new Properties(); properties.load(getClass().getClassLoader().getResourceAsStream(propsPath)); } + /** + * Get instance of subscriber properties. + * @param propsPath path to properties file + * @return SubscriberProps object + */ public static SubscriberProps getInstance(String propsPath) { - if(instance == null) { + if (instance == null) { try { instance = new SubscriberProps(propsPath); } catch (IOException ioe) { - subLogger.error("IO Exception: " + ioe.getMessage()); + subLogger.error("IO Exception: " + ioe.getMessage(), ioe); } } return instance;