aboutsummaryrefslogtreecommitdiffstats
path: root/ms/neng/src
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-12-28 02:48:50 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-28 02:48:50 +0000
commit65691146cceb8ee483cd4003f5fcc6fda14c0f01 (patch)
tree1a1266712d0deddd5bdb459b7c93316edbae753c /ms/neng/src
parentf5e7b450adf2392f5748ad0a95b1243527e65bee (diff)
parent26f7862d17e3668b5e258d8370458699db3968b9 (diff)
Merge "Fixed sonar issue in ExternalKeyValidator"
Diffstat (limited to 'ms/neng/src')
-rw-r--r--ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/validator/ExternalKeyValidator.java4
1 files changed, 3 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 4b7ec79b..c17158c0 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
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -36,7 +38,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 || genNameRepo.findByExternalId(externalId).isEmpty() ) {
+ if (!genNameRepo.findByExternalId(externalId).isEmpty() ) {
return true;
}
return false;