harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6143) [classlib][beans] java.beans.beancontext.BeanContextSupport.readChildren((ObjectInputStream) null) should throw NullPointerException
Date Wed, 22 Apr 2009 21:38:47 GMT

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


Mime
View raw message