From c40a403bd4fdd192b74e4cd970b3c94058a9e404 Mon Sep 17 00:00:00 2001 From: ms236b Date: Wed, 20 Mar 2019 09:58:23 -0400 Subject: Fixed an issue with volumes being null Blueprint generator fix. Local code coverage: 56.9%. Fixed pom. Issue-ID: DCAEGEN2-1125 Change-Id: Ib5db301b6ddfaadef4be1f9e1a56af03cf415f0a Signed-off-by: ms236b --- .../org/onap/blueprintgenerator/models/blueprint/Properties.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'blueprint-generator/src') diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java index 82afe33..40770f3 100644 --- a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java +++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java @@ -62,11 +62,14 @@ public class Properties { logD.setGet_input("log_directory"); this.setLog_info(logD); String logger = ""; - for(Volumes v: cs.getAuxilary().getVolumes()) { - if(v.getContainer().getBind().contains("/opt/app/") && v.getContainer().getBind().contains("logs")) { - logger = v.getContainer().getBind(); + if(cs.getAuxilary().getVolumes() != null) { + for(Volumes v: cs.getAuxilary().getVolumes()) { + if(v.getContainer().getBind().contains("/opt/app/") && v.getContainer().getBind().contains("logs")) { + logger = v.getContainer().getBind(); + } } } + LinkedHashMap logInp = new LinkedHashMap(); logInp.put("type", "string"); if(logger != "") { -- cgit 1.2.3-korg