X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=mod%2Fbpgenerator%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fblueprintgenerator%2Fmodels%2Fblueprint%2FProperties.java;h=4140ea3859b80ea8d3460b295597a8d7e8ae0292;hb=b50120936c0c848ef5c3ff1e46438f592aa83747;hp=5693f86839b8284492a17270772f69e8829c69c7;hpb=b9cb00657207bb020c1802485c930b46621d4813;p=dcaegen2%2Fplatform.git diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java index 5693f86..4140ea3 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java @@ -51,6 +51,8 @@ import org.onap.blueprintgenerator.models.dmaapbp.DmaapStreams; @JsonInclude(value = Include.NON_NULL) public class Properties { + ArrayList streams_publishes; + ArrayList streams_subscribes; private Appconfig application_config; private Auxilary docker_config; private Object image; @@ -62,8 +64,6 @@ public class Properties { private String name; private GetInput topic_name; private GetInput feed_name; - ArrayList streams_publishes; - ArrayList streams_subscribes; private TlsInfo tls_info; private ExternalTlsInfo external_cert; private ResourceConfig resource_config; @@ -159,8 +159,7 @@ public class Properties { public TreeMap> createDmaapProperties( TreeMap> inps, ComponentSpec cs, String override) { - TreeMap> retInputs = new TreeMap>(); - retInputs = inps; + TreeMap> retInputs = inps; //set the image GetInput image = new GetInput(); @@ -175,7 +174,7 @@ public class Properties { GetInput location = new GetInput(); location.setBpInputName("location_id"); this.setLocation_id(location); - LinkedHashMap locMap = new LinkedHashMap(); + LinkedHashMap locMap = new LinkedHashMap<>(); locMap.put("type", "string"); locMap.put("default", ""); retInputs.put("location_id", locMap); @@ -223,7 +222,7 @@ public class Properties { this.setApplication_config(app); //set the stream publishes - ArrayList pubStreams = new ArrayList(); + ArrayList pubStreams = new ArrayList<>(); if (cs.getStreams().getPublishes() != null) { for (Publishes publishes : cs.getStreams().getPublishes()) { if (isMessageRouterType(publishes.getType())) { @@ -245,7 +244,7 @@ public class Properties { } //set the stream subscribes - ArrayList subStreams = new ArrayList(); + ArrayList subStreams = new ArrayList<>(); if (cs.getStreams().getSubscribes() != null) { for (Subscribes subscribes : cs.getStreams().getSubscribes()) { if (isMessageRouterType(subscribes.getType())) { @@ -266,10 +265,10 @@ public class Properties { } } - if (pubStreams.size() != 0) { + if (!pubStreams.isEmpty()) { this.setStreams_publishes(pubStreams); } - if (subStreams.size() != 0) { + if (!subStreams.isEmpty()) { this.setStreams_subscribes(subStreams); }