[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/24105] New: GapContent not properly updating Positions
From: |
abalkiss at redhat dot com |
Subject: |
[Bug swing/24105] New: GapContent not properly updating Positions |
Date: |
28 Sep 2005 16:56:00 -0000 |
Border case for Position implementation, run the testcase below. If "Two" is
instead inserted at position 3, or if the original position was at 5 then
everything works, so this is a boundary case when the string is inserted exactly
at the offset of a Position.
***TESTCASE***
expected output: 8
actual output: 4
import javax.swing.text.*;
public class PositionExample {
public static void main(String[] args) throws BadLocationException
{
PlainDocument doc = new PlainDocument();
doc.insertString(0, "One Three Four", null);
Position pos = doc.createPosition(4);
doc.insertString(4, "Two ", null);
System.out.println (pos.getOffset());
}
}
--
Summary: GapContent not properly updating Positions
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: swing
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: abalkiss at redhat dot com
CC: bug-classpath at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24105
- [Bug swing/24105] New: GapContent not properly updating Positions,
abalkiss at redhat dot com <=