Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Could
-
Resolution: Fixed
-
Affects Version/s: Platform 1.11.5
-
Fix Version/s: Core 2.1.0
-
Component/s: None
Description
passing deserialize(String) into doGetTextSummary(Concept) causes a NullPointerException if the String is blank. The issue arrives at line 44 of ConceptDatatype at concept.getName(). The function doGetTextSummary assumes a non-null concept is passed into it.
See attached executable bug report, causes an error from:
openmrs-core/api/src/test/java/org/openmrs/customdatatype/datatype/ConceptDatatypeTest.java
mvn -Dtest=ConceptDatatypeTest test
Similarly, many datatypes with a deserialize function return null if the string parameter is blank(i.e. ProviderDatatype, ProgramDatatype). This could be an issue as from what I can see, null is only checked throughout all Customdatatype functions when the input parameter is a string.