diff options
author | Arindam Mondal <arind.mondal@samsung.com> | 2019-02-18 15:13:43 +0900 |
---|---|---|
committer | arindamm <arind.mondal@samsung.com> | 2019-02-18 15:14:02 +0900 |
commit | a67690cd52ced8efa6fd7bae334a4ff65bd0daec (patch) | |
tree | aa8e74786d69a693bb07708b8135a9ab92650099 /src/main | |
parent | dfb5588c61ad49a5fdbc96d7a3dda5e5f887438c (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-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()); } + } } |