United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4726571 : Contradictory Javadoc note in TreeModelEvent for node changed events on root

Details
Type:
Bug
Submit Date:
2002-08-05
Status:
Resolved
Updated Date:
2003-09-26
Project Name:
JDK
Resolved Date:
2003-09-26
Component:
docs
OS:
windows_2000
Sub-Component:
guides
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
5.0 (tiger)

Related Reports

Sub Tasks

Description

Name: jl125535			Date: 08/05/2002


FULL PRODUCT VERSION :
java version "1.4.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)


A DESCRIPTION OF THE PROBLEM :
This report is related to 4199472.

The Javadoc note in the TreeModelEvent constructor at 
"http://java.sun.com/j2se/1.4/docs/api/javax/swing/event/TreeModelEvent.html#TreeModelEvent(java.lang.Object, java.lang.Object[], int[], java.lang.Object[])" states:

"To create a node changed event for the root node, specify
the parent as null and the "child" index as zero."

But the TreeModelListener javadoc for treeNodesChanged at "http://java.sun.com/j2se/1.4/docs/api/javax/swing/event/TreeModelListener.html#treeNodesChanged(javax.swing.event.TreeModelEvent)" states:

"To indicate the root has changed, childIndices and children
will be null."

Since DefaultTreeModel, VariableHeightLayoutCache, and FixedHeightLayoutCache use null for the childIndices and children parameters of the TreeModelEvent constructor, I assume that theTreeModelEvent javadoc note is erroneous.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look at the javadoc source and code source for files listed
in the description.
(Review ID: 139197) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b22


                                     
2004-06-14
PUBLIC COMMENTS

.
                                     
2004-06-10
EVALUATION

I will double check with engineering and fix this for the next release.
###@###.### 2002-08-05

Reviewed by Scott, CCC approved.  Fixed for tiger.
###@###.### 2003-09-11
                                     
2002-08-05



Hardware and Software, Engineered to Work Together