Description
In API v2, using Variables#setJsonVariable using a null value e.g. setJsonVariable("foo", null) throws a NullPointerException because VariablesImpl uses getClass() on the serialized object which breaks if the object is null.
Effected DSF Version
To Reproduce
Call setJsonVariable in a process plugin with a variable name of your choice and a null value.
Expected Behavior
Set the variable to null, don't throw a NullPointerException.
Logs
BPE:
WARN pool-6-thread-1 - AbstractErrorHandler.handleException(68) | Process dsfdev_ping:4:64a6671d-791f-11f1-af47-76c45e579722 has fatal error in step SavePongServiceTask:1bbb9b12-79e4-11f1-8645-ba4df22d5e8b for service task https://ttp/fhir/Task/e2f34a84-479a-4a0d-93e7-19ad57339158, reason: java.lang.NullPointerException - Cannot invoke "Object.getClass()" because "json" is null
Description
In API v2, using
Variables#setJsonVariableusing a null value e.g.setJsonVariable("foo", null)throws aNullPointerExceptionbecause VariablesImpl usesgetClass()on the serialized object which breaks if the object is null.Effected DSF Version
To Reproduce
Call
setJsonVariablein a process plugin with a variable name of your choice and a null value.Expected Behavior
Set the variable to null, don't throw a
NullPointerException.Logs
BPE: