aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorJegadeesh Babu <jegabab1@in.ibm.com>2019-02-11 18:14:35 +0530
committerJegadeesh Babu <jegabab1@in.ibm.com>2019-02-11 18:14:58 +0530
commita67dccfe7e932426786c686565186b51dfb48902 (patch)
treef9728de3bbf0d3ddc6560549fdd804193c32abb3 /src/main/java/org
parentdd899213724ceaab3bb141dfb5cbf4eb7b89404a (diff)
added local variable instead of using method args
Added local variable sonar bug fix Issue-ID: MUSIC-322 Change-Id: I73c90d2fbfea4bd91f767bbb67eb1774a75ce3f1 Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/music/service/impl/MusicCassaCore.java7
1 files changed, 4 insertions, 3 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 8737a060..36d756bb 100644
--- a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
+++ b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
@@ -3,6 +3,7 @@
* org.onap.music
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
+ * Modifications Copyright (c) 2018 IBM.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -165,7 +166,7 @@ public class MusicCassaCore implements MusicCoreService {
String keyspace = splitString[0].substring(1);//remove '$'
String table = splitString[1];
String primaryKeyValue = splitString[2].substring(0, splitString[2].lastIndexOf("$"));
- fullyQualifiedKey = lockId.substring(1, lockId.lastIndexOf("$"));
+ String localFullyQualifiedKey = lockId.substring(1, lockId.lastIndexOf("$"));
String lockRef = lockId.substring(lockId.lastIndexOf("$")+1); //lockRef is "$" to end
ReturnType result = isTopOfLockStore(keyspace, table, primaryKeyValue, lockRef);
@@ -175,7 +176,7 @@ public class MusicCassaCore implements MusicCoreService {
//check to see if the value of the key has to be synced in case there was a forceful release
String syncTable = keyspace+".unsyncedKeys_"+table;
- String query = "select * from "+syncTable+" where key='"+fullyQualifiedKey+"';";
+ String query = "select * from "+syncTable+" where key='"+localFullyQualifiedKey+"';";
PreparedQueryObject readQueryObject = new PreparedQueryObject();
readQueryObject.appendQueryString(query);
ResultSet results = MusicDataStoreHandle.getDSHandle().executeQuorumConsistencyGet(readQueryObject);
@@ -189,7 +190,7 @@ public class MusicCassaCore implements MusicCoreService {
String exceptionAsString = sw.toString();
return new ReturnType(ResultType.FAILURE, "Exception thrown while syncing key:\n" + exceptionAsString);
}
- String cleanQuery = "delete from music_internal.unsynced_keys where key='"+fullyQualifiedKey+"';";
+ String cleanQuery = "delete from music_internal.unsynced_keys where key='"+localFullyQualifiedKey+"';";
PreparedQueryObject deleteQueryObject = new PreparedQueryObject();
deleteQueryObject.appendQueryString(cleanQuery);
MusicDataStoreHandle.getDSHandle().executePut(deleteQueryObject, "critical");