[ 
https://issues.apache.org/jira/browse/DIRMINA-822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008139#comment-13008139
 ] 

Rob Eden commented on DIRMINA-822:
----------------------------------

I agree with Ulrich's patch. There's no explanation of why OOS/OIS are being 
overridden the way they are (original SVN change is 597545: 
http://svn.apache.org/viewvc/mina/trunk/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java?r1=594412&r2=597545)
 and from all I can see they're just creating issues.

If backwards compatibility of the protocol is desired, it can be changed to 
always write "0" and then leave the reading portion as-is.

> Deserialising classes that do not implement Serializable fails
> --------------------------------------------------------------
>
>                 Key: DIRMINA-822
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-822
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.2
>            Reporter: Ulrich Kreher
>         Attachments: AbstractIoBuffer.patch
>
>
> AbstractIoBuffer uses ObjectStreamClass.lookup(Class) which returns null for 
> classes that do not implement Serializable. This in turn leads to a 
> NullPointerException a few lines below in resolveClass(ObjectStreamClass) 
> where the ObjectStreamClass-parameter is null.
> Deserialising a non-serialisable class is completely legal, instances of such 
> a class will already fail to serialise so they will never get to 
> deserialisation.
> Using ObjectStreamClass.lookupAny(Class) will solve this issue, but it is not 
> available before Java 6.

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

Reply via email to