[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches]: FYI: GapContent fix
From: |
Lillian Angel |
Subject: |
Re: [cp-patches]: FYI: GapContent fix |
Date: |
Wed, 07 Sep 2005 14:09:26 -0400 |
Silly mistake!
2005-09-07 Lillian Angel <address@hidden>
* javax/swing/text/GapContent.java:
Fixes Bug #PR22966
(getOffset): Fixed check, was redundant.
On Wed, 2005-09-07 at 11:57 -0600, Tom Tromey wrote:
> >>>>> "Lillian" == Lillian Angel <address@hidden> writes:
>
> Lillian> - if (mark <= gapStart)
> Lillian> + if (mark <= gapStart || mark <= gapEnd)
>
> Isn't gapEnd >= gapStart?
> So the first test is redundant?
>
> Also, in passing, I wonder whether GapContent should use an ArrayList
> rather than a LinkedList to store the list of positions, for
> efficiency. In particular a binarySearch (performed in several places
> on 'positions') is more efficient on an ArrayList.
>
> Tom
patch.diff
Description: Text Data