commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Saprykin (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
Date Mon, 20 Dec 2010 18:08:01 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973281#action_12973281
] 

Igor Saprykin edited comment on COLLECTIONS-363 at 12/20/10 1:06 PM:
---------------------------------------------------------------------

I attempted to follow your instructions and done a test case which use .obj files (see patch
attached). I'm also open for any suggestions about making it better.

I wonder why splitmap.TestTransformedMap extends BulkTest, but not a AbstractTestObject like
all other containers.

      was (Author: isaprykin):
    Patch with .obj file and test case
  
> TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
> -----------------------------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-363
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-363
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.2
>            Reporter: Sebb
>         Attachments: COLLECTIONS-363-obj-test.patch, COLLECTIONS-363.patch
>
>
> TransformedMap is Serializable but its superclass doesn't define an accessible void constructor.
> For example, the following test fails:
> {code}
> 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();
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message