You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/04/09 08:08:13 UTC

[jira] Created: (HARMONY-6143) [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException

[classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException
------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6143
                 URL: https://issues.apache.org/jira/browse/HARMONY-6143
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M8
            Reporter: Kevin Zhou
             Fix For: 5.0M9


Given a test case [1], RI passes them all while HY fails the 1st test scenario.
Initialize a BeanContextSupport object using default constructor, add a object which implements Serializable. Then invoking readChildren of this object triggers a NullPointerException.
But for HY, it needs to write this added object first, then invoking readChildren of this object can trigger a NullPointerException; otherwise no exception is thrown.

[1] Test Case:
public void test_readChildren_scenario1() throws Exception {
    BeanContextSupport beanContextSupport = new BeanContextSupport();
    beanContextSupport.add("Serializable");
    try {
        beanContextSupport.readChildren((ObjectInputStream) null);
        fail("should throw NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}

public void test_readChildren_scenario2() throws Exception {
    BeanContextSupport beanContextSupport = new BeanContextSupport();
    beanContextSupport.add("Serializable");
    beanContextSupport.writeChildren(new ObjectOutputStream(new ByteArrayOutputStream()));
    try {
        beanContextSupport.readChildren((ObjectInputStream) null);
        fail("should throw NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6143) [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException

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

Tim Ellison updated HARMONY-6143:
---------------------------------

    Fix Version/s:     (was: 5.0M9)
                   5.0M10

> [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6143
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6143
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6143.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes them all while HY fails the 1st test scenario.
> Initialize a BeanContextSupport object using default constructor, add a object which implements Serializable. Then invoking readChildren of this object triggers a NullPointerException.
> But for HY, it needs to write this added object first, then invoking readChildren of this object can trigger a NullPointerException; otherwise no exception is thrown.
> [1] Test Case:
> public void test_readChildren_scenario1() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }
> public void test_readChildren_scenario2() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     beanContextSupport.writeChildren(new ObjectOutputStream(new ByteArrayOutputStream()));
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6143) [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException

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

Kevin Zhou updated HARMONY-6143:
--------------------------------

    Attachment: HARMONY-6143.diff

Would you please help to try it?

> [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6143
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6143
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Kevin Zhou
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6143.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes them all while HY fails the 1st test scenario.
> Initialize a BeanContextSupport object using default constructor, add a object which implements Serializable. Then invoking readChildren of this object triggers a NullPointerException.
> But for HY, it needs to write this added object first, then invoking readChildren of this object can trigger a NullPointerException; otherwise no exception is thrown.
> [1] Test Case:
> public void test_readChildren_scenario1() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }
> public void test_readChildren_scenario2() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     beanContextSupport.writeChildren(new ObjectOutputStream(new ByteArrayOutputStream()));
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-6143) [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException

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

Tim Ellison resolved HARMONY-6143.
----------------------------------

    Resolution: Fixed

Thank you Kevin.

Patch applied to BEANS module at repo revision r765560.

Please check it was applied as you expected.


> [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6143
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6143
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6143.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes them all while HY fails the 1st test scenario.
> Initialize a BeanContextSupport object using default constructor, add a object which implements Serializable. Then invoking readChildren of this object triggers a NullPointerException.
> But for HY, it needs to write this added object first, then invoking readChildren of this object can trigger a NullPointerException; otherwise no exception is thrown.
> [1] Test Case:
> public void test_readChildren_scenario1() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }
> public void test_readChildren_scenario2() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     beanContextSupport.writeChildren(new ObjectOutputStream(new ByteArrayOutputStream()));
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-6143) [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException

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

Kevin Zhou closed HARMONY-6143.
-------------------------------


Thanks Tim.

> [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6143
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6143
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6143.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes them all while HY fails the 1st test scenario.
> Initialize a BeanContextSupport object using default constructor, add a object which implements Serializable. Then invoking readChildren of this object triggers a NullPointerException.
> But for HY, it needs to write this added object first, then invoking readChildren of this object can trigger a NullPointerException; otherwise no exception is thrown.
> [1] Test Case:
> public void test_readChildren_scenario1() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }
> public void test_readChildren_scenario2() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     beanContextSupport.writeChildren(new ObjectOutputStream(new ByteArrayOutputStream()));
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-6143) [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException

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

Tim Ellison reassigned HARMONY-6143:
------------------------------------

    Assignee: Tim Ellison

> [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6143
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6143
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6143.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes them all while HY fails the 1st test scenario.
> Initialize a BeanContextSupport object using default constructor, add a object which implements Serializable. Then invoking readChildren of this object triggers a NullPointerException.
> But for HY, it needs to write this added object first, then invoking readChildren of this object can trigger a NullPointerException; otherwise no exception is thrown.
> [1] Test Case:
> public void test_readChildren_scenario1() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }
> public void test_readChildren_scenario2() throws Exception {
>     BeanContextSupport beanContextSupport = new BeanContextSupport();
>     beanContextSupport.add("Serializable");
>     beanContextSupport.writeChildren(new ObjectOutputStream(new ByteArrayOutputStream()));
>     try {
>         beanContextSupport.readChildren((ObjectInputStream) null);
>         fail("should throw NullPointerException");
>     } catch (NullPointerException e) {
>         // Expected
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.