diff options
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaInput.java')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaInput.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaInput.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaInput.java index c4eba4fe50..a06f67c005 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaInput.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaInput.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,21 +17,20 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.be.tosca.model; import java.util.HashMap; import java.util.Map; public class ToscaInput extends ToscaProperty { - private Map<String,ToscaAnnotation> annotations; + + private Map<String, ToscaAnnotation> annotations; //copy constructor - public ToscaInput(ToscaProperty toscaProperty){ + public ToscaInput(ToscaProperty toscaProperty) { super(toscaProperty); } - public Map<String, ToscaAnnotation> getAnnotations() { return annotations; } @@ -39,12 +38,11 @@ public class ToscaInput extends ToscaProperty { public void setAnnotations(Map<String, ToscaAnnotation> annotations) { this.annotations = annotations; } - public void addAnnotation(String name, ToscaAnnotation annotaion){ - if ( annotations == null ){ + + public void addAnnotation(String name, ToscaAnnotation annotaion) { + if (annotations == null) { annotations = new HashMap<>(); } annotations.put(name, annotaion); - - } } |