AnsweredAssumed Answered

Classes not Serializable by mistake

Question asked by vrentschler on Sep 3, 2012
Latest reply on Sep 27, 2012 by frederikheremans1
Hi,

Trying to serialize some queries, I found that there are a classes that do not implement Serializable, although there does not seem to be a reason not to. Also, there are classes implementing Serializable which contain fields that are not. Just a few examples:

Classes that implement Serializable but contain non-serializable fields:
org.activiti.engine.impl.cmd.SetUserPictureCmd, field 'picture' -> org.activiti.engine.identity.Picture
org.activiti.engine.impl.persistence.entity.TaskEntity, field 'taskDefinition' -> org.activiti.engine.impl.task.TaskDefinition
org.activiti.engine.impl.pvm.runtime.ExecutionImpl, field 'startingExecution' -> org.activiti.engine.impl.pvm.runtime.StartingExecution

Classes that have a "serialVersionUID" but do not implement Serializable:
org.activiti.engine.impl.variable.BooleanType.class
org.activiti.engine.impl.variable.NullType.class
… and almost all the other classes in that package, some not having a "serialVersionUID".
All "VariableType"s should implement Serializable, because it is referenced, for example, in the serializable class org.activiti.engine.impl.persistence.entity.HistoricVariableUpdateEntity…

I'd open a JIRA-Issue for this, if no one disagrees that there should be an effort done to remedy this 'situation'.

Outcomes