Name: gm110360 Date: 05/26/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
A DESCRIPTION OF THE PROBLEM :
In J2SE 1.5b1 JTable.checkLeadAnchor() calls interface methods with an undocumented argument:
ListSelectionModel.setAnchorSelectionIndex(-1)
ListSelectionModel.setLeadSelectionIndex(-1)
In J2SE 1.4.2 and prior, these two methods are never called with the argument -1. The ListSelectionModel interface does not require these methods to support being called with the argument -1. Therefore migrating from J2SE 1.4.2 to J2SE 1.5, my implementation of ListSelectionModel broke violently. I assume that other custom implementations of ListSelectionModel will have similar problems when used with J2SE 1.5.
The simple workaround is to call clearSelection() instead of setAnchorSelectionIndex() and setLeadSelectionIndex().
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 275173)
======================================================================