When adding the variable with a custom data type and specifying ClassName (e.g. java.util.List) the lines like the following are added to the BPMN:
<itemDefinition id="_1-variable1" structureRef="java.util.List" />
...
<property id="variable1" itemSubjectRef="null"/>
which is not correct and makes the ClassName reset to java.lang.Object after closing and reopening the variable dialog and doesn't allow to use variable in the script tasks and/or entry/exit action without casting.