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 143182 - BadLocationException: Length must be positive
Summary: BadLocationException: Length must be positive
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: martin_adamek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-07 14:04 UTC by Lukas Jungmann
Modified: 2008-10-30 14:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-08-07 14:04:44 UTC
-create new groovy-java demo app (from samples/groovy)
-open DisplayProvider.groovy in the editor
-put cursor position to "...Groovy!"|"
-invoke CC
-hit backspace (and  delete) until everything is deleted

=>

SEVERE [global]
javax.swing.text.BadLocationException: Length must be positive
        at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:775)
[catch] at org.netbeans.modules.groovy.editor.AstPath.<init>(AstPath.java:83)
        at org.netbeans.modules.groovy.editor.parser.GroovyOccurrencesFinder.run(GroovyOccurrencesFinder.java:120)
        at org.netbeans.modules.groovy.editor.parser.GroovyOccurrencesFinder.run(GroovyOccurrencesFinder.java:69)
        at
org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.processImpl(MarkOccurrencesHighlighter.java:173)
        at org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:113)
        at org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:80)
        at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1362)
...
Comment 1 martin_adamek 2008-08-12 16:06:50 UTC
Fixed.
http://hg.netbeans.org/main/rev/b63812d726ba
Comment 2 Quality Engineering 2008-08-14 15:56:07 UTC
Integrated into 'main-golden', available in build *200808141419* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/b63812d726ba
User: Martin Adamek <martin_adamek@netbeans.org>
Log: #143182: BadLocationException: Length must be positive
Comment 3 Lukas Jungmann 2008-10-02 16:54:56 UTC
v.