summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorezhil <ezhrajam@in.ibm.com>2018-11-29 19:11:50 +0530
committerTschaen, Brendan <ctschaen@att.com>2018-12-10 12:03:40 -0500
commita953042bfebbfea013a0725b19f33da2aef9a6d6 (patch)
treee57515103e96c7610937715c0224b63d6ffa0574
parent0768534363e9e6f2d6efd962fb1af94e5e9c166c (diff)
Fixed Sonar issues in JsonUpdate
Update logger interface Renamed variable and Logged error Issue-ID: MUSIC-216 Change-Id: I341c0e14c13fb071d0a606eba27e79b4ee510ede Signed-off-by: ezhil <ezhrajam@in.ibm.com>
-rw-r--r--src/main/java/org/onap/music/datastore/jsonobjects/JsonUpdate.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/JsonUpdate.java b/src/main/java/org/onap/music/datastore/jsonobjects/JsonUpdate.java
index c1a56819..514f34ab 100644
--- a/src/main/java/org/onap/music/datastore/jsonobjects/JsonUpdate.java
+++ b/src/main/java/org/onap/music/datastore/jsonobjects/JsonUpdate.java
@@ -3,6 +3,7 @@
* org.onap.music
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
+ * Modifications Copyright (C) 2018 IBM.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +34,11 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import org.onap.music.eelf.logging.EELFLoggerDelegate;
+import org.onap.music.eelf.logging.format.AppMessages;
+import org.onap.music.eelf.logging.format.ErrorSeverity;
+import org.onap.music.eelf.logging.format.ErrorTypes;
+
@ApiModel(value = "JsonTable", description = "Json model for table update")
@JsonIgnoreProperties(ignoreUnknown = true)
public class JsonUpdate implements Serializable {
@@ -43,7 +49,8 @@ public class JsonUpdate implements Serializable {
private String timestamp;
private Map<String, String> consistencyInfo;
private transient Map<String, Object> conditions;
- private transient Map<String, Object> row_specification;
+ private transient Map<String, Object> rowSpecification;
+ private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JsonUpdate.class);
@ApiModelProperty(value = "Conditions")
public Map<String, Object> getConditions() {
@@ -56,11 +63,11 @@ public class JsonUpdate implements Serializable {
@ApiModelProperty(value = "Information for selecting sepcific rows")
public Map<String, Object> getRow_specification() {
- return row_specification;
+ return rowSpecification;
}
- public void setRow_specification(Map<String, Object> row_specification) {
- this.row_specification = row_specification;
+ public void setRow_specification(Map<String, Object> rowSpecification) {
+ this.rowSpecification = rowSpecification;
}
@@ -125,7 +132,7 @@ public class JsonUpdate implements Serializable {
out = new ObjectOutputStream(bos);
out.writeObject(this);
} catch (IOException e) {
- e.printStackTrace();
+ logger.error(EELFLoggerDelegate.errorLogger, e,AppMessages.IOERROR, ErrorSeverity.ERROR, ErrorTypes.DATAERROR);
}
return bos.toByteArray();
}