diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-05-05 12:55:26 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2020-05-06 12:47:56 +0000 |
commit | bb3b3a39f5d5c68f3ae4ad1e7f6bf3f095fe9701 (patch) | |
tree | 593d569434bdfce7368a4e7e03e3f9743af2fbe9 /appc-config/appc-data-services | |
parent | a6e49b16be6136a76b0aa1f170cf6aa79ad765fe (diff) |
lowered code smells
Issue-ID: APPC-1859
Change-Id: I72ead8caf7c34efbd62d215e7d55a688c5cfe5e5
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'appc-config/appc-data-services')
-rw-r--r-- | appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/db/CtxParameterizedResolver.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/db/CtxParameterizedResolver.java b/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/db/CtxParameterizedResolver.java index bc4728a6b..56caf566d 100644 --- a/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/db/CtxParameterizedResolver.java +++ b/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/db/CtxParameterizedResolver.java @@ -40,7 +40,7 @@ import com.att.eelf.configuration.EELFManager; public class CtxParameterizedResolver { - private static String CRYPT_KEY = "QtfJMKggVk"; + private static String cryptKey = "QtfJMKggVk"; private static final EELFLogger log = EELFManager.getInstance().getLogger(CtxParameterizedResolver.class); protected static String resolveCtxVars(String key, SvcLogicContext ctx, ArrayList<String> arguments) { @@ -92,7 +92,7 @@ public class CtxParameterizedResolver { if (ctxVarName.indexOf('[') == -1) { // Ctx variable contains no arrays - if ("CRYPT_KEY".equals(ctxVarName)) { + if ("cryptKey".equals(ctxVarName)) { // Handle crypt key as special case. If it's set as a context // variable, use it. Otherwise, use // configured crypt key. @@ -100,7 +100,7 @@ public class CtxParameterizedResolver { if ((cryptKey != null) && (cryptKey.length() > 0)) { return (cryptKey); } else { - return (CRYPT_KEY); + return (cryptKey); } } return (ctx.getAttribute(ctxVarName)); @@ -204,7 +204,7 @@ public class CtxParameterizedResolver { PreparedStatement stmt = conn.prepareStatement("SELECT CAST(AES_DECRYPT(?, ?) AS CHAR(50)) FROM DUAL")) { stmt.setBytes(1, colValue); - stmt.setString(2, CRYPT_KEY); + stmt.setString(2, cryptKey); results = stmt.executeQuery(); if ((results != null) && results.next()) { |