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.
Summary: | Insert string to EMPTY StyledDocument throws Exception from org.openide.text.LineStruct. | ||
---|---|---|---|
Product: | ide | Reporter: | _ lkramolis <lkramolis> |
Component: | Code | Assignee: | _ lkramolis <lkramolis> |
Status: | CLOSED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Resolved for 3.4.x or earlier, no new info since then -> verify. Resolved for 3.4.x or earlier, no new info since then -> closing. |
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)