Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
According to the Extensible Runtime Containment and Services Protocol (v1.0), if an object that implements BeanContextProxy is added to a BeanContext, than the BeanContextChild returned from BeanContextProxy.getBeanContextProxy() should be also added to that BeanContext. The same is specified for 'remove' operation.
However, Harmony implementation of BeanContextSupport behaves differently. Only the object that implements BeanContextProxy is added in the described case. To reproduce the issue, please run the testcase listed below.
The expected output is
Context size: 2
But on Harmony the testcase prints
Context size: 1
------------------------------------- Test.java ---------------------------------------
import java.beans.beancontext.*;
public class Test {
public static void main(String[] args) throws Exception
{ BeanContextSupport context = new BeanContextSupport(); context.add(new MyBeanContextProxy()); System.out.println("Context size: "+context.size()); }static class MyBeanContextProxy implements BeanContextProxy {
private BeanContextChild child = new BeanContextChildSupport();
public BeanContextChild getBeanContextProxy()
{ return child; }}
}
--------------------------------------------------------------------------------------
Affected tests:
functional/org/apache/harmony/test/func/api/java/beans/beancontext/TestSizeBeanContext.xml
(see HARMONY-3528)
Attachments
Issue Links
- blocks
-
HARMONY-4107 [M2] umbrella task for 98% pass rate of Functional test suite - HARMONY-3528; no regression since M1
- Closed