diff options
author | 2019-02-12 18:51:08 +0530 | |
---|---|---|
committer | 2019-02-12 13:32:22 +0000 | |
commit | cf87d8d10c075810ea0122087f8eb6ea74dc305b (patch) | |
tree | 7fa21098a488650963486bed23dd235d6c4a8219 /src/main | |
parent | dd899213724ceaab3bb141dfb5cbf4eb7b89404a (diff) |
Introduced local variable
Introduced local variable instead of using method args
Issue-ID: MUSIC-323
Change-Id: I670c49e2b28ba280d3446868ac042dfdae2b6c16
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java b/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java index ff77bfde..045abd98 100644 --- a/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java +++ b/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java @@ -254,6 +254,7 @@ public class MusicConditional { StringBuilder fieldsString = new StringBuilder("(vector_ts"+","); StringBuilder valueString = new StringBuilder("(" + "?" + ","); String vector = String.valueOf(Thread.currentThread().getId() + System.currentTimeMillis()); + String localPrimaryKey; queryObject.addValue(vector); if(casscadeColumn!=null && casscadeColumnValues!=null) { fieldsString.append(casscadeColumn).append(" ,"); @@ -267,8 +268,8 @@ public class MusicConditional { fieldsString.append(entry.getKey()); Object valueObj = entry.getValue(); if (primaryKeyName.equals(entry.getKey())) { - primaryKey = entry.getValue() + ""; - primaryKey = primaryKey.replace("'", "''"); + localPrimaryKey = entry.getValue() + ""; + localPrimaryKey = localPrimaryKey.replace("'", "''"); } DataType colType = null; try { |