Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.2
-
None
Description
TransformedMap is Serializable but its superclass doesn't define an accessible void constructor.
For example, the following test fails:
public void testSerialisation() throws Exception { TransformedMap<String, String, String, String> map = TransformedMap.decorate( new HashMap<String, String>(), NOPTransformer.<String> getInstance(), NOPTransformer.<String> getInstance()); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bytes); out.writeObject(map); // fails with java.io.InvalidClassException: org.apache.commons.collections.splitmap.TransformedMap; no valid constructor out.close(); }