[jboss-jira] [JBoss JIRA] Commented: (JBCOMMON-64) MarshalledValueInputStream's resolveClass() method breaks when deserializing primitive class types.
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Tue Aug 26 05:21:50 EDT 2008
[ https://jira.jboss.org/jira/browse/JBCOMMON-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12426623#action_12426623 ]
Manik Surtani commented on JBCOMMON-64:
---------------------------------------
Ok, I don't seem to have commit privileges on this project. So here's the patch containing unit test as well as fix.
> MarshalledValueInputStream's resolveClass() method breaks when deserializing primitive class types.
> ---------------------------------------------------------------------------------------------------
>
> Key: JBCOMMON-64
> URL: https://jira.jboss.org/jira/browse/JBCOMMON-64
> Project: JBoss Common
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: common-core (2.x)
> Affects Versions: 2.2.7.GA
> Reporter: Manik Surtani
> Fix For: 2.2.8.GA
>
>
> Test that proves this:
> public class MarshalledValuePrimitivesTest extends TestCase
> {
> public void testPrimitive() throws Exception
> {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> ObjectOutputStream oos = new ObjectOutputStream(baos);
> oos.writeObject(int.class);
> oos.close();
> baos.close();
> ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
> MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais);
> Object o = mvis.readObject(); // barfs here.
> assertNotNull(o);
> assertEquals(o, int.class);
> }
> }
> Also see http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172498#4172498 where it was reported.
> This is also related to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list