diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2019-01-11 11:39:18 +0530 |
---|---|---|
committer | Sandeep J <sandeejh@in.ibm.com> | 2019-01-11 11:39:26 +0530 |
commit | 9d535dce4e6fbe11d63c2ea7bf2a8e86bd8707d9 (patch) | |
tree | 2ea78bc668124edfc7c07872c92cbbdc9fd5d0a3 /src/main/java/org | |
parent | 366337b206ee8fbc0da8fcabc44ca2f34ccaeab9 (diff) |
fixed sonar issues in RestMusicAdminAPI.java
fixed sonar issues
Issue-ID: MUSIC-182
Change-Id: If523b22d3daae8adadfc6858596529ca03e682cb
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'src/main/java/org')
-rwxr-xr-x | src/main/java/org/onap/music/rest/RestMusicAdminAPI.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java index 7fb7b1d5..67f50dbb 100755 --- a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java +++ b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java @@ -287,7 +287,7 @@ public class RestMusicAdminAPI { ResultSet rs = MusicCore.get(pQuery); List<Row> rows = rs.all(); String uuid = null; - if (rows.size() == 0) { + if (rows.isEmpty()) { resultMap.put("Exception", "Application not found. Please make sure Application exists."); logger.error(EELFLoggerDelegate.errorLogger, "", AppMessages.INCORRECTDATA, @@ -418,8 +418,7 @@ public class RestMusicAdminAPI { @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response callbackOps(final JSONObject inputJsonObj) { - // {"keyspace":"conductor","full_table":"conductor.plans","changeValue":{"conductor.plans.status":"Who??","position":"3"},"operation":"update","table_name":"plans","primary_key":"3"} - Map<String, Object> resultMap = new HashMap<>(); + Map<String, Object> resultMap = new HashMap<>(); new Thread(new Runnable() { public void run() { makeAsyncCall(inputJsonObj); @@ -446,9 +445,7 @@ public class RestMusicAdminAPI { return Response.status(Status.OK).entity(resultMap).build(); } List<String> inputUpdateList = jsonResponse.getUpdateList(); - /*String field_value = changeValueMap.get("field_value"); - if(field_value == null) - field_value = jsonResponse.getFull_table();*/ + String field_value = null; List<String> notifiyList = CachingUtil.getCallbackNotifyList(); if(notifiyList == null || notifiyList.isEmpty()) { |