bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/26434] Bug in DefaultListSelectionModel, possible fix and tes


From: abalkiss at redhat dot com
Subject: [Bug swing/26434] Bug in DefaultListSelectionModel, possible fix and testcase attached
Date: 28 Feb 2006 21:11:36 -0000


------- Comment #3 from abalkiss at redhat dot com  2006-02-28 21:11 -------
This is fixed, not with the suggested patch, however.  A test like this:
        test.addSelectionInterval(-1, -1);
        System.out.println (test.getMinSelectionIndex());
        System.out.println (test.getMaxSelectionIndex());
        test.addSelectionInterval(0, 0);
        System.out.println (test.getMinSelectionIndex());
        System.out.println (test.getMaxSelectionIndex());

shows that we should not consider -1 to be zero, so instead we just return
early if we encounter -1 for either of the indices.

2006-02-28  Anthony Balkissoon  <address@hidden>

        PR classpath/26434
        * javax/swing/DefaultListSelectionModel.java:
        (addSelectionInterval): Return early if either of the arguments is -1.
        (removeSelectionInterval): Likewise.
        (setSelectionInterval): Likewise.


-- 

abalkiss at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26434





reply via email to

[Prev in Thread] Current Thread [Next in Thread]