[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mina-dev
Subject:    [jira] [Updated] (DIRMINA-627) ByteBuffer.getObject() doesn't
From:       "Julien Vermillard (JIRA)" <jira () apache ! org>
Date:       2011-08-30 8:42:38
Message-ID: 448841169.6794.1314693758132.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/DIRMINA-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Julien Vermillard updated DIRMINA-627:
--------------------------------------

    Fix Version/s:     (was: 3.0.0-M1)

> ByteBuffer.getObject() doesn't support Class objects for non-serializable classes
> ---------------------------------------------------------------------------------
> 
> Key: DIRMINA-627
> URL: https://issues.apache.org/jira/browse/DIRMINA-627
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.7
> Reporter: Owen Jacobson
> Fix For: 2.0.3
> 
> Attachments: AbstractIoBuffer.java, IoBufferTest.java, fix.patch, tests.patch
> 
> 
> Instances of java.lang.Class are serializable, whether or not the class they \
> represent is serializable.  However, org.apache.mina.common.ByteBuffer's \
> optimizations prevent it from unserializing Class instances representing classes \
> that are not serializable.  For example, given public interface NotSerializable {}
> /*...*/
> ObjectOutputStream o = /*...*/;
> o.writeObject (NotSerializable.class);
> /*...*/
> ObjectInputStream i = /*..bytes written by o, above..*/;
> Object read = i.readObject();
> The 'read' object will be NotSerializable.class.
> Trying the same thing with buffer.putObject (NotSerializable.class); buffer.flip(); \
> buffer.getObject() throws a NullPointerException.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic