fix null pointer

Change-Id: If530734b96c32b25b2ed5df847c83dca2c633184
Issue-ID: SDC-1926
Signed-off-by: Tufman, Shay <st198j@intl.att.com>
diff --git a/pom.xml b/pom.xml
index c25d8a7..20a4dc3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 
 	<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>
 
diff --git a/src/main/java/org/onap/sdc/toscaparser/api/DataEntity.java b/src/main/java/org/onap/sdc/toscaparser/api/DataEntity.java
index 2a12a71..1559e66 100644
--- a/src/main/java/org/onap/sdc/toscaparser/api/DataEntity.java
+++ b/src/main/java/org/onap/sdc/toscaparser/api/DataEntity.java
@@ -49,9 +49,11 @@
         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);
diff --git a/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java b/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java
index 6fc8771..8e587a9 100644
--- a/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java
+++ b/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java
@@ -111,6 +111,16 @@
         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());
diff --git a/src/test/resources/csars/service-JennyVtsbcKarunaSvc-csar.csar b/src/test/resources/csars/service-JennyVtsbcKarunaSvc-csar.csar
new file mode 100644
index 0000000..3f80621
--- /dev/null
+++ b/src/test/resources/csars/service-JennyVtsbcKarunaSvc-csar.csar
Binary files differ
diff --git a/version.properties b/version.properties
index ed1cd82..442dce4 100644
--- a/version.properties
+++ b/version.properties
@@ -5,7 +5,7 @@
 
 major=1
 minor=4
-patch=6
+patch=7
 
 base_version=${major}.${minor}.${patch}