summaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java11
1 files changed, 6 insertions, 5 deletions
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 7ba4d22..c043a9e 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
@@ -80,20 +80,21 @@ public class Blueprint {
}
return bp;
}
+
public Blueprint setQuotations(Blueprint bp) {
for(String s: bp.getInputs().keySet()) {
LinkedHashMap<String, Object> temp = bp.getInputs().get(s);
if(temp.get("type") == "string") {
String def = (String) temp.get("default");
- if(def != null && def.equals("")){
- String emptyString = "\"\"";
- Object emptyObj = emptyString;
- temp.put("default", emptyObj);
+ if(def != null){
+ def = def.replaceAll("\"$", "").replaceAll("^\"", "");
}
+ def = '"' + def + '"';
+ temp.replace("default", def);
bp.getInputs().replace(s, temp);
}
}
-
+
return bp;
}