#191171 - IndexOutOfBoundsException: bitIndex < 0: -1

Tomas Stupka <[email protected]> Mon, 21 Mar 2011 13:39:36 +0100
Newsgroups gmane.comp.java.netbeans.reviewers
Message-ID <[email protected]>
http://netbeans.org/bugzilla/show_bug.cgi?id=191171

the exception is thrown when calling fireTableRowsDeleted() with endRow < 0

Impact: exception is thrown in scope of jtable.fireTableRowsDeleted() or jtable.fireTableRowsAdded() 

Fix: do not retrieve startRow and endRow for a task in TaskListModel.tasksRemoved() (as the model might have changed in the meantime) and call fireTableDataChanged() instead of fireTableRowsDeleted() .
see also http://hg.netbeans.org/core-main/rev/d747dc5f7c65

Risk: save - jtable is notified about changes in the model while not being provided with inconsistent values as it was the case before the fix

thanks
t.