diff options
-rw-r--r-- | catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlResult.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlResult.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlResult.java index 5075f485..e64a6abb 100644 --- a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlResult.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlResult.java @@ -153,7 +153,10 @@ public class ParseYamlResult { }
private List<Plan> jsonObject2PlanList(JsonObject plans) {
- List<Plan> retList = new ArrayList<Plan>();
+ if (plans == null) {
+ return new ArrayList<>();
+ }
+ List<Plan> retList = new ArrayList<>();
Iterator<Entry<String, JsonElement>> iterator = plans.entrySet().iterator();
while (iterator.hasNext()) {
Plan ret = new Plan();
|