When you operate on the returned value from a List
, Set
, or Map
property, do not rely on the concrete implementation of this class. You should not serialize this value, or use it directly in the setPropertyValue
call for another List
, Set
, or Map
property. Instead, you can copy these values into another List that you create and use that value. For example:
List ls = (List) item.getPropertyValue("someListProperty"); ArrayList toUseElsewhere = new ArrayList(); toUseElsewhere.addAll(ls);
Now you can use toUseElsewhere
in a writeObject
call or in another setPropertyValue
call.