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] Created: (HARMONY-3566) [classlib][luni]the readObjectOverride() mechanism for subclasses of java.io.ObjectInputStream does not work correctly
Date Wed, 04 Apr 2007 02:50:32 GMT
[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


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