summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverter.java')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverter.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverter.java
index 6e077d60a1..9922c0f05d 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverter.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverter.java
@@ -39,12 +39,15 @@ public class HeatJsonConverter implements PropertyValueConverter {
@Override
public String convert(String original, String innerType, Map<String, DataTypeDefinition> dataTypes) {
- String coverted = ValidationUtils.removeNoneUtf8Chars(original);
- coverted = ValidationUtils.removeHtmlTagsOnly(coverted);
- coverted = ValidationUtils.normaliseWhitespace(coverted);
- coverted = ValidationUtils.stripOctets(coverted);
+ if (original == null) {
+ return null;
+ }
+ String converted = ValidationUtils.removeNoneUtf8Chars(original);
+ converted = ValidationUtils.removeHtmlTagsOnly(converted);
+ converted = ValidationUtils.normaliseWhitespace(converted);
+ converted = ValidationUtils.stripOctets(converted);
// As opposed to string converter, keeping the " and ' symbols
- return coverted;
+ return converted;
}
}