From f327e0cb4a14ff8d4f85e5ae9da5986b8c87ab8c Mon Sep 17 00:00:00 2001 From: "Thomas Nelson Jr (arthurdent3) tn1381@att.com" Date: Sun, 4 Mar 2018 03:28:07 -0500 Subject: Sonar Fixes to increate Coverage on Unit tests Including bug fix that added proper Exception handling on REST Calls. Change-Id: I618faa69ab549e76c148bb7c664a5ffe0eae84ca Issue-ID: MUSIC-44, MUSIC-45 Signed-off-by: Thomas Nelson Jr (arthurdent3) tn1381@att.com --- src/main/java/org/onap/music/rest/RestMusicAdminAPI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/onap/music/rest/RestMusicAdminAPI.java') diff --git a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java index 0265d039..6d8ac088 100755 --- a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java +++ b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java @@ -195,7 +195,7 @@ public class RestMusicAdminAPI { String ks = row.getString("keyspace_name"); if (!ks.equals(MusicUtil.DEFAULTKEYSPACENAME)) { PreparedQueryObject queryObject = new PreparedQueryObject(); - queryObject.appendQueryString("DROP KEYSPACE " + ks + ";"); + queryObject.appendQueryString("DROP KEYSPACE IF EXISTS " + ks + ";"); MusicCore.nonKeyRelatedPut(queryObject, consistency); } } -- cgit 1.2.3-korg