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-4272) [classlib][beans] BeanContextServicesSupport.releaseService() throws unexpected NPE
Date Thu, 02 Aug 2007 12:02:53 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Ellison updated HARMONY-4272:
---------------------------------

    Assignee: Tim Ellison

> [classlib][beans]  BeanContextServicesSupport.releaseService() throws unexpected NPE
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4272
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4272
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Roman S. Bushmanov
>            Assignee: Tim Ellison
>         Attachments: H-4272-test.patch, H-4272.patch
>
>
> The following NPE is thrown by the testcase listed below.
> Uncaught exception in main:
> java.lang.NullPointerException
>         at java.beans.beancontext.BeanContextServicesSupport.releaseServiceWithoutCheck(BeanContextServicesSupport.java:786)
>         at java.beans.beancontext.BeanContextServicesSupport.releaseService(BeanContextServicesSupport.java:773)
>         at Test.main(Test.java:12)
> The exception is thrown on attempt  to call releaseServise() method for the bean which
didn't previously request any services.
> In my opinion in such a case releaseService() method should return silently as RI does.
In other words an additional check for bcssChild.serviceRecords field is required in the method
releaseServiceWithoutCheck().
> --------------------------- Test.java -------------------------------------
> import java.beans.beancontext.*;
> public class Test {
>     public static void main(String[] args) throws Exception {
>         BeanContextServicesSupport context = new BeanContextServicesSupport();
>         BeanContextChild child = new BeanContextChildSupport();
>         context.add(child);
>         context.releaseService(child, child, new Object());
>     }
> }
> ------------------------------------------------------------------------------
> This issue affects the following functional test
> functional/org/apache/harmony/test/func/api/java/beans/beancontext/TestBeanContextServicesSupport.xml

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