diff options
author | Thomas Nelson <nelson24@att.com> | 2019-01-17 20:39:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-17 20:39:46 +0000 |
commit | 0002abffd3ac6a7e7de164f18f53449e42de8bff (patch) | |
tree | da8f3bf251008930b32fafc59793757eff8d186a /src | |
parent | 0ffce002c0c46e0a6d05770eb1f4f806b42faddb (diff) | |
parent | 9d535dce4e6fbe11d63c2ea7bf2a8e86bd8707d9 (diff) |
Merge "fixed sonar issues in RestMusicAdminAPI.java"
Diffstat (limited to 'src')
-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()) { |