diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2019-03-11 14:28:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-11 14:28:31 +0000 |
commit | 4149f3256a0b0948a766fb83824032e53beee2ff (patch) | |
tree | 91f66ea03caeba8eb41ed334c7dbe4215d43399d /src/main | |
parent | 1d70b235a5f1a79e5922b94f10c9d2c1d1e974b3 (diff) | |
parent | a67690cd52ced8efa6fd7bae334a4ff65bd0daec (diff) |
Merge "Sonar fix add logger"
Diffstat (limited to 'src/main')
-rwxr-xr-x | src/main/java/org/onap/dcae/collectors/restconf/common/DataChangeEventListener.java | 34 |
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()); } + } } |