<Swing Dev> [10] Review Request: JDK-6463710 : ListSelectionModel.setSelectionMode() underspecified

Pankaj Bansal pankaj.b.bansal at oracle.com
Wed Sep 27 06:17:02 UTC 2017


Hi All,

 

Please review the fix for JDK 10.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-6463710

 

Webrev:

http://cr.openjdk.java.net/~aghaisas/pankaj/6463710/webrev.00/

 

Issue:

ListSelectionModel.setSelectionMode() or JList.setSelectionMode() does not change the selection and leaves the selection in inconsistent state. This bug will affect the JList and JTable as they both use ListSelectionModel. The JTree uses it indirectly through TreeSelectionModel which handles it.

 

Fix:

Made changes in ListSelectionModel to check if the selectionMode has changed and if yes, clear the selection. 

Made changes in JList to make it consistent with JTable.

Added a test program to test the functionality for ListSelectionModel.setSelectionMode()

 

 

Regards,

Pankaj Bansal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20170926/6042f6f8/attachment.html>


More information about the swing-dev mailing list