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 254636 - [81cat]javax.swing.text.BadLocationException: Invalid offset=517, docLen=475
Summary: [81cat]javax.swing.text.BadLocationException: Invalid offset=517, docLen=475
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 07:08 UTC by manikantannaren
Modified: 2015-09-18 14:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 219379


Attachments
stacktrace (8.43 KB, text/plain)
2015-08-24 07:08 UTC, manikantannaren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description manikantannaren 2015-08-24 07:08:46 UTC
Build: NetBeans IDE Dev (Build 201508230002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.60-b23, Java(TM) SE Runtime Environment, 1.8.0_60-ea-b25
OS: Mac OS X

User Comments:
manikantannaren: package naming;
public class Naming {

    public static void staticMethod() {
        int x = 4;        
    }

    public static void method() {
        int x = 4;
        int y = x + 1;
        System.out.println(y);               
    }
                
}

In the above class select 4 in staticMethod
RMB|Refacttor|Introduce |Method
Enter getX in dialog
Got this error




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=517, docLen=475
   at org.netbeans.modules.editor.lib2.view.EditorView.checkBounds(EditorView.java:509)
   at org.netbeans.modules.editor.lib2.view.EditorView.modelToView(EditorView.java:246)
   at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1509)
   at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1047)
   at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1022)
   at javax.swing.text.JTextComponent.modelToView(JTextComponent.java:1377)
Comment 1 manikantannaren 2015-08-24 07:08:48 UTC
Created attachment 155565 [details]
stacktrace
Comment 2 manikantannaren 2015-09-18 14:43:59 UTC
Dont see it happening on Build 201509170002. Guess one of situation.

We can close this as WorksForMe I think.