<Swing Dev> [10] Review Request: JDK-8191436 : ListSelectionModel.setSelectionMode() underspecified
Pankaj Bansal
pankaj.b.bansal at oracle.com
Wed Nov 29 12:54:09 UTC 2017
Hi All,
Please review the fix for JDK 10.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8191436
Webrev:
http://cr.openjdk.java.net/~pbansal/8191436/webrev.00/
Issue:
ListSelectionModel.setSelectionMode() or JList.setSelectionMode() does not change the selection and leaves the selection in inconsistent state.
Fix:
Made changes in ListSelectionModel to check if the selectionMode has changed and if yes, change the selection accordingly.
Note:
This is bug is a recreation of https://bugs.openjdk.java.net/browse/JDK-6463710 as the fix for the bug was reverted because of https://bugs.openjdk.java.net/browse/JDK-8190475
The previous didn't check if the current selection is empty or not before trying to reset the selection. Because of which wrong values were being sent to setSelectionInterval. The current fix addresses these problems. Also, I have run the jtreg JList, JTable and JTree tests which may use DefaultListSelectionModel, tests and demos mentioned in the bug https://bugs.openjdk.java.net/browse/JDK-8190475.
Regards,
Pankaj Bansal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20171129/4dc3f93c/attachment.html>
More information about the swing-dev
mailing list