From cf87d8d10c075810ea0122087f8eb6ea74dc305b Mon Sep 17 00:00:00 2001 From: Jegadeesh Babu Date: Tue, 12 Feb 2019 18:51:08 +0530 Subject: Introduced local variable Introduced local variable instead of using method args Issue-ID: MUSIC-323 Change-Id: I670c49e2b28ba280d3446868ac042dfdae2b6c16 Signed-off-by: Jegadeesh Babu --- .../java/org/onap/music/conductor/conditionals/MusicConditional.java | 5 +++-- 1 file 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 { -- cgit 1.2.3-korg