summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorArindam Mondal <arind.mondal@samsung.com>2019-02-18 15:13:43 +0900
committerarindamm <arind.mondal@samsung.com>2019-02-18 15:14:02 +0900
commita67690cd52ced8efa6fd7bae334a4ff65bd0daec (patch)
treeaa8e74786d69a693bb07708b8135a9ab92650099 /src/main
parentdfb5588c61ad49a5fdbc96d7a3dda5e5f887438c (diff)
Sonar fix add logger
Issue-ID: DCAEGEN2-1230 Change-Id: I891486b91d6b028bfd48e764b7efb7c964d47310 Signed-off-by: arindamm <arind.mondal@samsung.com>
Diffstat (limited to 'src/main')
-rwxr-xr-xsrc/main/java/org/onap/dcae/collectors/restconf/common/DataChangeEventListener.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/main/java/org/onap/dcae/collectors/restconf/common/DataChangeEventListener.java b/src/main/java/org/onap/dcae/collectors/restconf/common/DataChangeEventListener.java
index a78a7e5..98bb74a 100755
--- a/src/main/java/org/onap/dcae/collectors/restconf/common/DataChangeEventListener.java
+++ b/src/main/java/org/onap/dcae/collectors/restconf/common/DataChangeEventListener.java
@@ -28,24 +28,24 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DataChangeEventListener implements EventListener {
- private static final Logger log = LoggerFactory.getLogger(DataChangeEventListener.class);
- private RestConfContext ctx;
+ private static final Logger log = LoggerFactory.getLogger(DataChangeEventListener.class);
+ private RestConfContext ctx;
- public DataChangeEventListener(RestConfContext ctx) {
- this.ctx = ctx;
- }
+ public DataChangeEventListener(RestConfContext ctx) {
+ this.ctx = ctx;
+ }
- @Override
- public void onEvent(InboundEvent event) {
- JSONArray jsonArrayMod;
- log.info("On SSE Event is received");
- String s = event.readData();
- JSONObject jsonObj = new JSONObject(s);
- jsonArrayMod = new JSONArray().put(jsonObj);
- try {
- RestConfProc.handleEvents(jsonArrayMod);
- } catch (Exception e) {
- e.printStackTrace();
- }
+ @Override
+ public void onEvent(InboundEvent event) {
+ JSONArray jsonArrayMod;
+ log.info("On SSE Event is received");
+ String s = event.readData();
+ JSONObject jsonObj = new JSONObject(s);
+ jsonArrayMod = new JSONArray().put(jsonObj);
+ try {
+ RestConfProc.handleEvents(jsonArrayMod);
+ } catch (Exception e) {
+ log.error("Error in DataChangeEventListener ", e.getMessage());
}
+ }
}