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:50:32 UTC

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

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


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

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang reassigned HARMONY-3566:
------------------------------------

    Assignee: Paulex Yang

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


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

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Patch Info: [Patch Available]

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


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

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang resolved HARMONY-3566.
----------------------------------

    Resolution: Fixed

Ruth, patch applied at r526665, thanks a lot for this enhancement, please verify, thanks.

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


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

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
     [ 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.