aboutsummaryrefslogtreecommitdiffstats
path: root/appc-config/appc-encryption-tool
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-03-20 13:03:26 +0000
committerTakamune Cho <takamune.cho@att.com>2019-03-21 00:12:32 +0000
commit530c16191693903bdc5bd16de944e48a3f4542a4 (patch)
tree06f59f8d35848f1411ad1b2009b587b8019341a4 /appc-config/appc-encryption-tool
parent8c06462b211d573926ee1101759d818f846ea7f5 (diff)
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 <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-config/appc-encryption-tool')
-rw-r--r--appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java3
1 files changed, 2 insertions, 1 deletions
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(