JDK-4890858 : AbstractListModel.fireIntervalRemoved javadoc is not clear
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-07-15
  • Updated: 2017-05-16
  • Resolved: 2003-09-05
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: 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
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b19
2004-06-14

PUBLIC COMMENTS .
2004-06-10

EVALUATION Yep, submitter is correct. ###@###.### 2003-08-12 Had Scott review changes. Approved by CCC. Fixed for tiger. ###@###.### 2003-08-22
2003-08-12