classpath-patches
[Top][All Lists]
Advanced

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

Re: [cp-patches] fixing the JTextArea.replaceRange


From: Michael Koch
Subject: Re: [cp-patches] fixing the JTextArea.replaceRange
Date: Sat, 26 Feb 2005 21:04:19 +0100
User-agent: mutt-ng 1.5.8i (Debian)

On Sat, Feb 26, 2005 at 08:00:58PM +0100, Meskauskas Audrius wrote:
> The Mauve test gnu.testlet.javax.swing.JTextArea.text indicates the incorrect 
> work of the text replacement methods in JTextArea. For example, if the string 
> is 
> "0123456789", the replaceRange(3,5, "replacement") should result the 
> "012replacement56789" and surely not "012replacement89" as it does.
> 
> The problem was that the author of the replaceRange method have 
> misinterpreted the meaning of the second parameter in the doc.remove(int, 
> int). This is the 
> length of the segment being removed and not the absolute bound of the range 
> being removed.
> 
> The problem can be esily fixed by correcting this method.

The fix is correct. Thanks for fixing.

The change in the catch clause is redundant. The exception can never be
thrown as we check the the arguments above.

Please commit the fix to the remove() call.


Michael




reply via email to

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