United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4890858 AbstractListModel.fireIntervalRemoved javadoc is not clear
JDK-4890858 : AbstractListModel.fireIntervalRemoved javadoc is not clear

Details
Type:
Bug
Submit Date:
2003-07-15
Status:
Resolved
Updated Date:
2003-09-05
Project Name:
JDK
Resolved Date:
2003-09-05
Component:
client-libs
OS:
windows_xp
Sub-Component:
javax.swing
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.2
Fixed Versions:
5.0 (tiger)

Related Reports

Sub Tasks

Description

Name: rmT116609			Date: 07/15/2003


A DESCRIPTION OF THE PROBLEM :
I was replacing the data in my list model with a shorter list and calling fireIntervalRemoved but still getting ArrayIndexOutOfBoundsExceptions. The javadoc says to specify the *new* elements, so I was specifying 0, newListSize.

It's now apparent to me that you should actually specify the elements *removed*.

The javadoc as it is, is very misleading and could do with a rewrite.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
index0 and index1 are the endpoints of the interval that's been removed
ACTUAL -
The new elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1.

Parameters:
index0 - one end of the new interval
index1 - the other end of the new interval


URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/AbstractListModel.html
(Incident Review ID: 191381) 
======================================================================

                                    

Comments
EVALUATION

Yep, submitter is correct.
###@###.### 2003-08-12

Had Scott review changes.  Approved by CCC.  Fixed for tiger.
###@###.### 2003-08-22
                                     
2003-08-12
PUBLIC COMMENTS

.
                                     
2004-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
generic
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b19


                                     
2004-06-14



Hardware and Software, Engineered to Work Together