United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4832328 : TreeModel.getIndexOfChild() documentation, solution for bug 4412870 not enough

Details
Type:
Bug
Submit Date:
2003-03-13
Status:
Resolved
Updated Date:
2003-09-26
Project Name:
JDK
Resolved Date:
2003-09-26
Component:
docs
OS:
windows_98
Sub-Component:
guides
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
5.0 (tiger)

Related Reports

Sub Tasks

Description

Name: jk109818			Date: 03/13/2003


FULL PRODUCT VERSION :
JDK 1.4.1

A DESCRIPTION OF THE PROBLEM :
Even after closing of bug 4412870, the description of TreeModell.getIndexOfChild is not specific enough for the case that either parent or child do not belong to the tree anymore or did never belong to it.

The remark in the doc only specifies to return -1 if either parent or child is null. It does not specify the case that parent and child are non-null but still not part of the tree.

The actual behaviour of DefaultTreeModel and the only way I got my implementation of TreeModel to work together with JTree was to also return -1 in case parent or child are non-null but not belonging to the tree.

So I expect that the TreeModel is indeed meant to react like this. But then it should be documented like this.


REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 182378) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
generic
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b22


                                     
2004-06-14
PUBLIC COMMENTS

.
                                     
2004-06-10
EVALUATION



Name: dk30142			Date: 03/13/2003



======================================================================

Reviewed by sky.  Approved by CCC.  Fixed for tiger.
###@###.### 2003-09-15
                                     
2003-09-15



Hardware and Software, Engineered to Work Together