summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/CtxParameterizedResolver.java3
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/CtxParameterizedResolver.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/CtxParameterizedResolver.java
index d44ba066b..344463cd3 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/CtxParameterizedResolver.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/CtxParameterizedResolver.java
@@ -79,7 +79,8 @@ public class CtxParameterizedResolver {
if (term != null) {
term = term.replaceAll("'", "''");
}
- arguments.add(term);
+ //valueOf will store null values as a String "null"
+ arguments.add(String.valueOf(term));
return "?";
} else {
return (term);
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
index 471b0b019..4f1df9b99 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
@@ -104,6 +104,7 @@ public class DBService {
if (dblib != null && ctx != null) {
String key = "select max(ASDC_ARTIFACTS_ID) as id from ASDC_ARTIFACTS WHERE ARTIFACT_NAME = ?";
ArrayList<String> arguments = new ArrayList<>();
+ arguments.add(artifactName);
log.info("Getting Artifact ID String :" + key);
status = dblib.query(key, ctx, arguments);
if (status.toString().equals(FAILURE_PARAM)) {