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

 

Reply via email to