Hi,

JTree.setLeadSelectionPath() can be called with an null path. As is done
in clearSelection(). If a selectionModel was set we would use the path
without checking first whether or not it was null.

2006-09-17  Mark Wielaard  <[EMAIL PROTECTED]>

    * javax/swing/JTree.java (setLeadSelectionPath): Handle null path.

This get JabRef a little further.

Committed,

Mark

diff -u -r1.73 JTree.java
--- javax/swing/JTree.java      13 Aug 2006 20:34:03 -0000      1.73
+++ javax/swing/JTree.java      17 Sep 2006 22:57:25 -0000
@@ -2355,7 +2355,7 @@
     if (selectionModel != null)
       {
         TreePath oldValue = selectionModel.getLeadSelectionPath();
-        if (path.equals(oldValue))
+        if (path == oldValue || path != null && path.equals(oldValue))
           return;

         // Repaint the previous and current rows with the lead selection path.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to