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/10 11:04:32 UTC

[jira] Created: (HARMONY-3610) [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException

[classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException 
------------------------------------------------------------------------------------

                 Key: HARMONY-3610
                 URL: https://issues.apache.org/jira/browse/HARMONY-3610
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ruth Cao


The following test case:

private static class ObjectOutputStreamWriteOverride extends ObjectOutputStream {
        String test = "test";

        protected ObjectOutputStreamWriteOverride() throws IOException,
                SecurityException {
            super();
        }

        protected void writeObjectOverride(Object object) throws IOException {
            test = null;
            super.writeObjectOverride(object);
        }
}

public void test_writeObject_WriteOverride() throws Exception {
        ObjectOutputStreamWriteOverride mockOut = new ObjectOutputStreamWriteOverride();
        mockOut.writeObject(new Object());
        assertNull(mockOut.test);
   }

RI passes while Harmony throws IOException. It seems that the root cause is in the default impl of ObjectOutputStream.writeObjectOverride(). 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-3610) [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException

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

Paulex Yang resolved HARMONY-3610.
----------------------------------

    Resolution: Fixed

Ruth, patch applied with some modifications at r527857, I used a boolean field "subclassOverridingImplementation" as condition instead of the status of OutputStream instance, seems this boolean is defined for this kind of usage. Please verify, thanks a lot.

> [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException 
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3610
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ruth Cao
>         Assigned To: Paulex Yang
>         Attachments: Harmony-3610.diff
>
>
> The following test case:
> private static class ObjectOutputStreamWriteOverride extends ObjectOutputStream {
>         String test = "test";
>         protected ObjectOutputStreamWriteOverride() throws IOException,
>                 SecurityException {
>             super();
>         }
>         protected void writeObjectOverride(Object object) throws IOException {
>             test = null;
>             super.writeObjectOverride(object);
>         }
> }
> public void test_writeObject_WriteOverride() throws Exception {
>         ObjectOutputStreamWriteOverride mockOut = new ObjectOutputStreamWriteOverride();
>         mockOut.writeObject(new Object());
>         assertNull(mockOut.test);
>    }
> RI passes while Harmony throws IOException. It seems that the root cause is in the default impl of ObjectOutputStream.writeObjectOverride(). 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-3610) [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException

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

Paulex Yang reassigned HARMONY-3610:
------------------------------------

    Assignee: Paulex Yang

> [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException 
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3610
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ruth Cao
>         Assigned To: Paulex Yang
>         Attachments: Harmony-3610.diff
>
>
> The following test case:
> private static class ObjectOutputStreamWriteOverride extends ObjectOutputStream {
>         String test = "test";
>         protected ObjectOutputStreamWriteOverride() throws IOException,
>                 SecurityException {
>             super();
>         }
>         protected void writeObjectOverride(Object object) throws IOException {
>             test = null;
>             super.writeObjectOverride(object);
>         }
> }
> public void test_writeObject_WriteOverride() throws Exception {
>         ObjectOutputStreamWriteOverride mockOut = new ObjectOutputStreamWriteOverride();
>         mockOut.writeObject(new Object());
>         assertNull(mockOut.test);
>    }
> RI passes while Harmony throws IOException. It seems that the root cause is in the default impl of ObjectOutputStream.writeObjectOverride(). 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-3610) [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException

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

Ruth Cao updated HARMONY-3610:
------------------------------

    Attachment: Harmony-3610.diff

Would somebody try this?

> [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException 
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3610
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ruth Cao
>         Attachments: Harmony-3610.diff
>
>
> The following test case:
> private static class ObjectOutputStreamWriteOverride extends ObjectOutputStream {
>         String test = "test";
>         protected ObjectOutputStreamWriteOverride() throws IOException,
>                 SecurityException {
>             super();
>         }
>         protected void writeObjectOverride(Object object) throws IOException {
>             test = null;
>             super.writeObjectOverride(object);
>         }
> }
> public void test_writeObject_WriteOverride() throws Exception {
>         ObjectOutputStreamWriteOverride mockOut = new ObjectOutputStreamWriteOverride();
>         mockOut.writeObject(new Object());
>         assertNull(mockOut.test);
>    }
> RI passes while Harmony throws IOException. It seems that the root cause is in the default impl of ObjectOutputStream.writeObjectOverride(). 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-3610) [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException

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

Ruth Cao closed HARMONY-3610.
-----------------------------


Paulex, it's really better to use 'subclassOverridingImplementation', which makes the logic more clear. The fix looks fine, Thanks.

> [classlib][luni]java.io.ObjectOutputStream.writeObjectOverride() throws IOException 
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3610
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3610
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ruth Cao
>         Assigned To: Paulex Yang
>         Attachments: Harmony-3610.diff
>
>
> The following test case:
> private static class ObjectOutputStreamWriteOverride extends ObjectOutputStream {
>         String test = "test";
>         protected ObjectOutputStreamWriteOverride() throws IOException,
>                 SecurityException {
>             super();
>         }
>         protected void writeObjectOverride(Object object) throws IOException {
>             test = null;
>             super.writeObjectOverride(object);
>         }
> }
> public void test_writeObject_WriteOverride() throws Exception {
>         ObjectOutputStreamWriteOverride mockOut = new ObjectOutputStreamWriteOverride();
>         mockOut.writeObject(new Object());
>         assertNull(mockOut.test);
>    }
> RI passes while Harmony throws IOException. It seems that the root cause is in the default impl of ObjectOutputStream.writeObjectOverride(). 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.