-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.1
-
sparc
-
solaris_2.5.1
Name: sdC67446 Date: 04/27/99
The field
protected boolean loadedChildren;
of class javax.swing.DynamicUtilTreeNode
is 'true' if class was instantiated with null children and
method loadChildren() has not been called. The right value is 'false'.
The doc says:
--------------------------------------------------
protected boolean loadedChildren
Have the children been loaded yet?
The test demonstrating the bug:
-----------------Test.java------------------------
import javax.swing.JTree;
public class Test extends JTree.DynamicUtilTreeNode {
public Test(Object value, Object children) {
super(value, children);
}
public boolean getField_loadedChildren() {
return loadedChildren;
}
public static void main(String[] args) {
Test test;
test = new Test(null, new Object[0]);
System.out.println("children != null, no loadChildren(): "+
test.getField_loadedChildren());
test = new Test(null, new Object[0]);
test.loadChildren();
System.out.println("children != null, loadChildren(): "+
test.getField_loadedChildren());
test = new Test(null, null);
System.out.println("children == null, no loadChildren(): "+
test.getField_loadedChildren());
}
}
---------Output from the test---------------------
children != null, no loadChildren(): false
children != null, loadChildren(): true
children == null, no loadChildren(): true
--------------------------------------------------
======================================================================