When you are operating 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 l = (List) item.getPropertyValue("someListProperty");
ArrayList toUseElsewhere = new ArrayList();
toUseElsewhere.addAll(l);
Now you can use toUseElsewhere
either in a writeObject
call or in another setPropertyValue
call.