-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.5
Name: mgC56079 Date: 09/05/97
The java.beans.beancontext.BeanContextSupport.getSelectedChildren()
returns an array filled with nulls if some children selected.
Here is the JDK Specification:
--------------------------------------------------
public synchronized Object[] getSelectedChildren()
Returns:
an array containing the current (sub)set of children selected
Here is the test demonstrating the bug:
-----------------Test.java------------------------
import java.beans.beancontext.BeanContextSupport;
public class Test {
public static void main(String[] args) {
try {
BeanContextSupport bcs = new BeanContextSupport();
Object[] objects = new Object[1];
objects[0] = new Object();
bcs.addChildren(objects);
bcs.selectChildren(objects);
Object[] selected = bcs.getSelectedChildren();
if ((selected.length==1) && (selected[0] == null)) {
System.out.println("getSelectedChildren()[0] == null");
}
} catch (Exception e) {
System.out.println("Unexpected "+e+" thrown.");
}
}
}
---------Output from the test---------------------
getSelectedChildren()[0] == null
--------------------------------------------------
======================================================================