Details
-
Bug
-
Status: Closed
-
Could
-
Resolution: Fixed
-
Platform 1.11.5
-
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.