harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruth Cao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3566) [classlib][luni]the readObjectOverride() mechanism for subclasses of java.io.ObjectInputStream does not work correctly
Date Mon, 09 Apr 2007 07:59:32 GMT

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

Ruth Cao commented on HARMONY-3566:
-----------------------------------

Thanks, Paulex. The fix looks great.

> [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.


Mime
View raw message