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 238718 - IndexOutOfBoundsException: start=-536870476 < 0
Summary: IndexOutOfBoundsException: start=-536870476 < 0
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 238766 238768 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-22 19:58 UTC by Jiri Prox
Modified: 2013-11-27 15:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 205506


Attachments
stacktrace (4.36 KB, text/plain)
2013-11-22 19:58 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2013-11-22 19:58:15 UTC
Build: NetBeans IDE Dev (Build 20131121-463f9d09987b)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b49, Java(TM) SE Runtime Environment, 1.8.0-ea-b107
OS: Windows 7

User Comments:
jiriprox: IOOBE when performing instant rename 

Steps to reproduce:
1) have a code:
public class ClassARen {
    
    public int getX() {
        return 1;
    }

    public void use() {
        int x = getX();
    }
}

2) press Insert to get to override mode
3) start renaming on the first 'getX'
4) put cursor at the 'e'  inside 'e'
5) type new character
-> exception is thrown




Stacktrace: 
java.lang.IndexOutOfBoundsException: start=-536870476 < 0
   at org.netbeans.lib.editor.util.CharSequenceUtilities.checkIndexesValid(CharSequenceUtilities.java:529)
   at org.netbeans.modules.editor.lib2.document.CharContent.subSequence(CharContent.java:95)
   at org.netbeans.lib.editor.util.swing.DocumentUtilities.getText(DocumentUtilities.java:336)
   at org.netbeans.modules.refactoring.java.ui.SyncDocumentRegion.sync(SyncDocumentRegion.java:181)
   at org.netbeans.modules.refactoring.java.plugins.InstantRefactoringPerformer.insertUpdate(InstantRefactoringPerformer.java:313)
   at org.netbeans.editor.BaseDocument.handleInsertString(BaseDocument.java:850)
Comment 1 Jiri Prox 2013-11-22 19:58:17 UTC
Created attachment 142498 [details]
stacktrace
Comment 2 Milutin Kristofic 2013-11-26 12:05:29 UTC
*** Bug 238766 has been marked as a duplicate of this bug. ***
Comment 3 Milutin Kristofic 2013-11-26 13:08:12 UTC
*** Bug 238768 has been marked as a duplicate of this bug. ***
Comment 4 Ralph Ruijs 2013-11-27 15:01:06 UTC
changeset   : 598d0e431b2c
author      : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date        : Wed Nov 27 15:53:40 CET 2013
summary     : #238718 - do not remove when in overwrite-mode