harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman S. Bushmanov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4272) [classlib][beans] BeanContextServicesSupport.releaseService() throws unexpected NPE
Date Fri, 22 Jun 2007 16:30:26 GMT
[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

The following NPE is thrown by the testcase listed below.

Uncaught exception in main:
        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

--------------------------- 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.releaseService(child, child, new Object());

This issue affects the following functional test

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

View raw message