<groupId>org.onap.sdc.jtosca</groupId>
<artifactId>jtosca</artifactId>
- <version>1.4.6-SNAPSHOT</version>
+ <version>1.4.7-SNAPSHOT</version>
<name>sdc-jtosca</name>
<properties>
else {
if(!(value instanceof LinkedHashMap)) {
//ERROR under investigation
- ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue("JE001", String.format(
- "TypeMismatchError: \"%s\" is not a map. The type is \"%s\"",
- value.toString(),dataType.getType())));
+ String checkedVal = value != null ? value.toString() : null;
+
+ ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue("JE001", String.format(
+ "TypeMismatchError: \"%s\" is not a map. The type is \"%s\"",
+ checkedVal, dataType.getType())));
if (value instanceof List && ((List) value).size() > 0) {
value = ((List) value).get(0);
assertNull(nodeTemplate.getPropertyValueFromTemplatesByName("test"));
}
+ @Test
+ public void testNullValueHasNoNullPointerException() throws JToscaException {
+
+ String fileStr = JToscaImportTest.class.getClassLoader().getResource("csars/service-JennyVtsbcKarunaSvc-csar.csar").getFile();
+ File file = new File(fileStr);
+ ToscaTemplate toscaTemplate = new ToscaTemplate(file.getAbsolutePath(), null, true, null);
+ List<Input> inputs = toscaTemplate.getInputs();
+ assertNotNull(inputs);
+ }
+
private void validateInputsAnnotations(List<Input> inputs) {
List<Input> inputsWithAnnotations = inputs.stream().filter(i -> i.getAnnotations() != null)
.collect(Collectors.toList());
major=1
minor=4
-patch=6
+patch=7
base_version=${major}.${minor}.${patch}