JDK-4726571 : Contradictory Javadoc note in TreeModelEvent for node changed events on root
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-08-05
  • Updated: 2017-05-16
  • Resolved: 2003-09-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
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