summaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-design-services
diff options
context:
space:
mode:
Diffstat (limited to 'appc-inbound/appc-design-services')
-rw-r--r--appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java b/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java
index 4e6375b91..2353e6b0c 100644
--- a/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java
+++ b/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java
@@ -7,6 +7,7 @@
* Copyright (C) 2017 Amdocs
* ================================================================================
* Modifications (C) 2019 Ericsson
+ * Modifications (C) 2019 IBM
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -185,10 +186,12 @@ public class DesignDBService {
throw new DBException(
"Error occured while validating/Saving the artifact to SDC_ARTIFACTS or getting SDC_ARTIFACTS_ID .");
JsonNode json = payloadObject.get(DesignServiceConstants.USER_ID);
- if (json == null || json.asText().trim().isEmpty()) {
- log.info("UserId in Admin Aritfact is null or blank, User Id : " + json.asText());
- throw new DBException("User Id is null or blank");
- }
+ if (json == null) {
+ throw new DBException("User Id is null");
+ } else if (json.asText().trim().isEmpty()) {
+ log.info("UserId in Admin Aritfact is blank, User Id : " + json.asText());
+ throw new DBException("User Id is blank");
+ }
int sdcReferenceId = 0;
createArtifactTrackingRecord(payload, requestId, sdcArtifactId, sdcReferenceId);