From 9d535dce4e6fbe11d63c2ea7bf2a8e86bd8707d9 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 11 Jan 2019 11:39:18 +0530 Subject: fixed sonar issues in RestMusicAdminAPI.java fixed sonar issues Issue-ID: MUSIC-182 Change-Id: If523b22d3daae8adadfc6858596529ca03e682cb Signed-off-by: Sandeep J --- src/main/java/org/onap/music/rest/RestMusicAdminAPI.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/main') 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 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 resultMap = new HashMap<>(); + Map 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 inputUpdateList = jsonResponse.getUpdateList(); - /*String field_value = changeValueMap.get("field_value"); - if(field_value == null) - field_value = jsonResponse.getFull_table();*/ + String field_value = null; List notifiyList = CachingUtil.getCallbackNotifyList(); if(notifiyList == null || notifiyList.isEmpty()) { -- cgit 1.2.3-korg