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/20 06:56:15 UTC
[jira] Closed: (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 closed HARMONY-3566.
-----------------------------
> [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
> Assigned To: Paulex Yang
> 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.