You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ruth Cao (JIRA)" <ji...@apache.org> on 2007/04/04 04:53:33 UTC

[jira] Updated: (HARMONY-3566) [classlib][luni]the readObjectOverride() mechanism for subclasses of java.io.ObjectInputStream does not work correctly

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

Ruth Cao updated HARMONY-3566:
------------------------------

    Attachment: Harmony-3566.diff

May somebody pls try this one?

> [classlib][luni]the readObjectOverride() mechanism for subclasses of java.io.ObjectInputStream does not work correctly
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3566
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3566
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ruth Cao
>         Attachments: Harmony-3566.diff
>
>
> Considering the following test case: 
> class MockObjectInputStream extends ObjectInputStream {
> 	protected MockObjectInputStream() throws IOException, SecurityException {
> 		super();
> 	}
> 	@Override
> 	protected Object readObjectOverride() throws IOException, ClassNotFoundException {
> 		System.out.println("readObjectOverride");
> 		return super.readObjectOverride();
> 	}
> }
> public class ObjectInputStreamTest {
> 	
> 	public static void main(String[] args) throws Exception {
> 		MockObjectInputStream mock = new MockObjectInputStream();
> 		System.out.println(mock.readObject());
> 	}
> }
> RI outputs:
> readObjectOverride
> null
> while Harmony outputs:
> null
> It seems that in Harmony, subclasses of j.i.ObjectInputStream does not call readObjectOverride()  when readObject() is called. But RI does.
> I'll create a patch soon, thanks. 

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