From 530c16191693903bdc5bd16de944e48a3f4542a4 Mon Sep 17 00:00:00 2001 From: Joss Armstrong Date: Wed, 20 Mar 2019 13:03:26 +0000 Subject: Fix for incorrect handling of SQL results Corrected handling of SQL COUNT query Issue-ID: APPC-1545 Change-Id: I8c246b97c8ed8b483e79ae0e3b2cb51f8b4b62be Signed-off-by: Joss Armstrong --- .../org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'appc-config') diff --git a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java index 3b032d995..0910a5ba0 100644 --- a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java +++ b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java @@ -138,7 +138,8 @@ public class EncryptionToolDGWrapper implements SvcLogicJavaPlugin { log.info(fn + ":: Error retrieving credentials"); throw new SvcLogicException("Error retrieving credentials"); } - if (status == QueryStatus.NOT_FOUND) { + // SELECT COUNT query will return SUCCESS with a count of 0 when no data is found + if (status == QueryStatus.SUCCESS) { log.info(fn + ":: NOT_FOUND! No data found in device_authentication table for " + vnf_Type + " " + protocol + "" + action + ""); throw new SvcLogicException( -- cgit 1.2.3-korg