You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2007/08/02 14:06:54 UTC
[jira] Resolved: (HARMONY-4272) [classlib][beans]
BeanContextServicesSupport.releaseService() throws unexpected NPE
[ https://issues.apache.org/jira/browse/HARMONY-4272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-4272.
----------------------------------
Resolution: Fixed
Thanks Roman/Nellya.
Patch applied to BEANS module at repo revision r562086.
Please check it was applied as you expected.
> [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.