diff options
author | Brendan Tschaen <ctschaen@att.com> | 2019-08-14 15:30:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-14 15:30:23 +0000 |
commit | 3f1ce32c1beb3aff2a2904fdab2914b36e12e74f (patch) | |
tree | 2d3c4831ae8fb52dffb43def72e6a0fc27ce9ed5 /src | |
parent | 41ed9554c8a82ff672cc828b37d5ee017d9df3af (diff) | |
parent | 7fa642122c488a648160c609622e9e2d6d0a5d56 (diff) |
Merge "General sonar fixes: use logger"
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/music/service/impl/MusicCassaCore.java | 4 |
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); |