aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArindam Mondal <arind.mondal@samsung.com>2019-08-01 14:25:18 +0900
committerarind.mondal <arind.mondal@samsung.com>2019-08-01 14:25:41 +0900
commit7fa642122c488a648160c609622e9e2d6d0a5d56 (patch)
treead2bbb028050ac63f5dc2292a5ec6a46e21e7769
parente1fcfc8c861f15f281b63a65210893b6db16e543 (diff)
General sonar fixes: use logger
Issue-ID: MUSIC-410 Change-Id: Iac08df4b7534f3293f7ffa3ca1877b5baf044f89 Signed-off-by: arind.mondal <arind.mondal@samsung.com>
-rw-r--r--src/main/java/org/onap/music/service/impl/MusicCassaCore.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
index 04fcfd23..5c02d34d 100644
--- a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
+++ b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
@@ -128,7 +128,7 @@ public class MusicCassaCore implements MusicCoreService {
try {
lockReference = "" + getLockingServiceHandle().genLockRefandEnQueue(keyspace, table, lockName, locktype);
} catch (MusicLockingException | MusicServiceException | MusicQueryException e) {
- e.printStackTrace();
+ logger.error(EELFLoggerDelegate.applicationLogger, e);
throw new MusicLockingException("Unable to create lock reference. " + e.getMessage());
} catch (Exception e) {
logger.error(EELFLoggerDelegate.applicationLogger, e);
@@ -191,7 +191,7 @@ public class MusicCassaCore implements MusicCoreService {
PreparedQueryObject readQueryObject = new PreparedQueryObject();
readQueryObject.appendQueryString(query);
ResultSet results = MusicDataStoreHandle.getDSHandle().executeQuorumConsistencyGet(readQueryObject);
- if (results.all().size() != 0) {
+ if (!results.all().isEmpty()) {
logger.info("In acquire lock: Since there was a forcible release, need to sync quorum!");
try {
syncQuorum(keyspace, table, primaryKeyValue);