Activiti fail to store java.util.List variable with a first null first value

Description

In some tasks, I need to persist two lists, one with values, and another with captions.
Something like:

List<Integer> selectedValues;
List<String> captionValues;

I persist this two collections as process variables. But when "captionValues" have their first value as null (something that is possible in my domain), I got an NullPointerException:

Because this error, I can't complete the task.

The error occours because this line (60), of org.activiti.engine.impl.variable.JPAEntityListVariableType, assumes that theres a not null first element.

Class<?> entityClass = mappings.getEntityMetaData(list.get(0).getClass()).getEntityClass();

Environment

None

Status

Assignee

Joram Barrez

Reporter

Eduardo Frazão

Labels

None

Components

Affects versions

Priority

Low
Configure