From 4ed01bea8806595d85b9c73419e5d1fb582279a9 Mon Sep 17 00:00:00 2001 From: ezhil Date: Thu, 15 Nov 2018 19:33:49 +0530 Subject: Fixed sonar issue in ExternalKeyValidator Included empty method to check colletion Issue-ID: CCSDK-690 Change-Id: Ibf393c07f6d57f5871ad8c094c0d4ae1501da856 Signed-off-by: ezhil --- .../onap/ccsdk/apps/ms/neng/core/validator/ExternalKeyValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ms') diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/validator/ExternalKeyValidator.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/validator/ExternalKeyValidator.java index 28dde566..4b7ec79b 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/validator/ExternalKeyValidator.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/validator/ExternalKeyValidator.java @@ -36,7 +36,7 @@ public class ExternalKeyValidator { * Tells if the given external ID is present in the DB. */ public boolean isPresent(String externalId) { - if (genNameRepo.findByExternalId(externalId).size() > 0) { + if (genNameRepo.findByExternalId(externalId).size() > 0 || genNameRepo.findByExternalId(externalId).isEmpty() ) { return true; } return false; -- cgit 1.2.3-korg