-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2beta3
-
sparc
-
solaris_2.5
-
Verified
Name: sdC67446 Date: 10/01/97
Method iterator() returns Iterator filled with collection of BCSChildInfos instead of collection of children added into BeanContextSupport.
Here is the JDK source code comments:
--------------------------------------------------
iterator
public synchronized Iterator iterator()
Returns:
the iterator
Here is the test demonstrating the bug:
-----------------Test.java------------------------
import java.beans.beancontext.BeanContextSupport;
public class Test {
public static void main(String[] args) {
BeanContextSupport bcs = new BeanContextSupport();
bcs.add(new java.lang.Integer(666));
java.util.Iterator iterator = bcs.iterator();
if (!(iterator.next() instanceof java.lang.Integer)) {
System.out.println("!(iterator.next() instanceof java.lang.Integer)");
}
}
}
---------Output from the test---------------------
!(iterator.next() instanceof java.lang.Integer)
--------------------------------------------------
======================================================================