Code Review
/
dmaap
/
datarouter.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix sonar issues and reporting
[dmaap/datarouter.git]
/
datarouter-subscriber
/
src
/
main
/
java
/
org
/
onap
/
dmaap
/
datarouter
/
subscriber
/
SubscriberProps.java
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
f05ca5d
..
49cad50
100644
(file)
--- 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
@@
-23,29
+23,35
@@
package org.onap.dmaap.datarouter.subscriber;
package org.onap.dmaap.datarouter.subscriber;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import java.io.IOException;
import java.util.Properties;
import java.io.IOException;
import java.util.Properties;
-import org.apache.log4j.Logger;
public class SubscriberProps {
private static SubscriberProps instance = null;
public class SubscriberProps {
private static SubscriberProps instance = null;
- private static
Logger subLogger = Logger.getLogger("org.onap.dmaap.datarouter.subscriber.internal"
);
+ private static
EELFLogger logger = EELFManager.getInstance().getLogger(SubscriberProps.class
);
private Properties properties;
private Properties properties;
- private SubscriberProps(String propsPath) throws IOException{
+ private SubscriberProps(String propsPath) throws IOException
{
properties = new Properties();
properties.load(getClass().getClassLoader().getResourceAsStream(propsPath));
}
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) {
public static SubscriberProps getInstance(String propsPath) {
- if(instance == null) {
+ if
(instance == null) {
try {
instance = new SubscriberProps(propsPath);
} catch (IOException ioe) {
try {
instance = new SubscriberProps(propsPath);
} catch (IOException ioe) {
-
subL
ogger.error("IO Exception: " + ioe.getMessage(), ioe);
+
l
ogger.error("IO Exception: " + ioe.getMessage(), ioe);
}
}
return instance;
}
}
return instance;