From d0fae040ebc6de8eea6b281429275fb53a78704e Mon Sep 17 00:00:00 2001 From: Dhrumin Desai Date: Wed, 26 Feb 2020 10:22:33 -0500 Subject: fixed quotation issue in bp_gen Issue-ID: DCAEGEN2-2094 Change-Id: I62fa39b7d8bd685b88f5e196029bfd4e2e963171 Signed-off-by: Dhrumin Desai --- mod/bpgenerator/pom.xml | 2 +- .../org/onap/blueprintgenerator/models/blueprint/Blueprint.java | 8 +++++--- mod/bpgenerator/version.properties | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mod/bpgenerator/pom.xml b/mod/bpgenerator/pom.xml index e1a50b4..8f54eee 100644 --- a/mod/bpgenerator/pom.xml +++ b/mod/bpgenerator/pom.xml @@ -29,7 +29,7 @@ org.onap.dcaegen2.platform.mod blueprint-generator - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 1.6 1.6 diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java index 75c79ba..7ba4d22 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java @@ -85,8 +85,11 @@ public class Blueprint { LinkedHashMap temp = bp.getInputs().get(s); if(temp.get("type") == "string") { String def = (String) temp.get("default"); - def = '"' + def + '"'; - temp.replace("default", def); + if(def != null && def.equals("")){ + String emptyString = "\"\""; + Object emptyObj = emptyString; + temp.put("default", emptyObj); + } bp.getInputs().replace(s, temp); } } @@ -200,7 +203,6 @@ public class Blueprint { throw new RuntimeException(e); } - return Fixes.applyFixes(ret); } } diff --git a/mod/bpgenerator/version.properties b/mod/bpgenerator/version.properties index 7d6815b..fee4928 100644 --- a/mod/bpgenerator/version.properties +++ b/mod/bpgenerator/version.properties @@ -1,6 +1,6 @@ major=1 minor=3 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg