harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Li (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3830) [classlib]java.beans.beancontext.BeanContextServicesSupport.addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent) should return true even if fireEvent = false
Date Thu, 10 May 2007 06:04:15 GMT
[classlib]java.beans.beancontext.BeanContextServicesSupport.addService(Class serviceClass,
BeanContextServiceProvider bcsp, boolean fireEvent) should return true even if fireEvent =
false
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-3830
                 URL: https://issues.apache.org/jira/browse/HARMONY-3830
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Leo Li


Here is a testcase:

public void testBeanContextServicesSupport() {
        MockBeanContextServicesSupport mockBeanContextServicesSupport = new MockBeanContextServicesSupport();
        boolean result = mockBeanContextServicesSupport.addService(MockService.class, new
MockBeanContextServiceProvider(), false);
        assertTrue(result);
    }

    public static class MockBeanContextServicesSupport extends
            BeanContextServicesSupport {       
        private static final long serialVersionUID = 1L;

        public boolean addService(Class serviceClass,
                BeanContextServiceProvider bcsp, boolean fireEvent) {
            return super.addService(serviceClass, bcsp, fireEvent);
        }

    }

    public static class MockService implements Serializable {
        private static final long serialVersionUID = 1L;
    }

    public static class MockBeanContextServiceProvider implements
            BeanContextServiceProvider {
        public Iterator getCurrentServiceSelectors(BeanContextServices arg0,
                Class arg1) {            
            return null;
        }

        public Object getService(BeanContextServices arg0, Object arg1,
                Class arg2, Object arg3) {           
            return null;
        }

        public void releaseService(BeanContextServices arg0, Object arg1,
                Object arg2) {          
        }
    }

RI passes.
Harmony fails.

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