diff options
author | ezhil <ezhrajam@in.ibm.com> | 2018-11-15 19:33:49 +0530 |
---|---|---|
committer | ezhil <ezhrajam@in.ibm.com> | 2018-11-15 19:34:04 +0530 |
commit | 4ed01bea8806595d85b9c73419e5d1fb582279a9 (patch) | |
tree | 1e8feeae855f0cf0369daf3e02799ebbd35f7793 /ms/neng/src | |
parent | 452a3c355a74436457bd526e08c08583e64a7ae0 (diff) |
Fixed sonar issue in ExternalKeyValidator
Included empty method to check colletion
Issue-ID: CCSDK-690
Change-Id: Ibf393c07f6d57f5871ad8c094c0d4ae1501da856
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
Diffstat (limited to 'ms/neng/src')
-rw-r--r-- | ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/validator/ExternalKeyValidator.java | 2 |
1 files changed, 1 insertions, 1 deletions
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; |