This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 3273

Summary: Insert string to EMPTY StyledDocument throws Exception from org.openide.text.LineStruct.
Product: ide Reporter: _ lkramolis <lkramolis>
Component: CodeAssignee: _ lkramolis <lkramolis>
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ lkramolis 1999-08-10 21:59:14 UTC
Code:
    EditorSupport es = (EditorSupport)getCookie (EditorSupport.class);
    StyledDocument sdoc = es.getDocument();
>>  sdoc.remove (0, sdoc.getLength()); <<
>>  sdoc.insertString (0, some_string, null); <<

Exception:
java.util.NoSuchElementException

        at java.util.LinkedList$ListItr.previous(LinkedList.java:492)
        at org.openide.text.LineStruct$Info.insert(LineStruct.java:108)
        at org.openide.text.LineStruct.insertLinesImpl(LineStruct.java:353)
        at org.openide.text.LineStruct.access$1(LineStruct.java:347)
        at org.openide.text.LineStruct$1.run(LineStruct.java:306)
        at org.openide.util.Task.run(Task.java:127)
        at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:408)
Comment 1 Quality Engineering 2003-07-02 15:57:05 UTC
Resolved for 3.4.x or earlier, no new info since then -> verify.
Comment 2 Quality Engineering 2003-07-02 16:01:55 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.