Bug 151016 - StringIndexOutOfBoundsException: String index out of range: -1
StringIndexOutOfBoundsException: String index out of range: -1
Status: VERIFIED FIXED
Product: javascript
Classification: Unclassified
Component: Editor
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Torbjorn Norbye
issues@javascript
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT, 65fixes3-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-22 13:54 UTC by jbsabmello
Modified: 2009-03-16 16:33 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (1.49 KB, text/plain)
2008-10-22 13:54 UTC, jbsabmello
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jbsabmello 2008-10-22 13:54:26 UTC
Build: NetBeans IDE Dev (Build 200810171401)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05
OS: Windows XP, 5.1, x86

User Comments:
budgie67: In javascript editor: after typeing . and selecting from helplist by pressing one key

budgie67: In js editor when ctrl+space was pressed

GUEST: I was writing code, clicked Ctrl+Space for autocompletion, and boom. I was editing 

ox.std.vardump() 

function, and writing its name inside it (recursive call).

Sorry for my english ;) Good luck.

GUEST: editing javascript file

GUEST: javascript command completion

GUEST: Writing a javascript function in a javascript library file (file.js) used in a php application.

GUEST: using javascript code completion feature

GUEST: in javascript editor i typed "this.c" so that the list of variables and methods would appear. it did, after i typed "this." but when i added the "c", i got this exception

elcocolio: I was editing a Javascript module

GUEST: Adding a new member variable into a JavaScript element in a .js file

line at the beginning of a prototype function was initially this.layer = null;
I positioned the cursor at the beginning of the line and typed 'this.cur', then the exception appeared.

GUEST: the editor autocompleting a Javascript file (Iam working with Ext JS)

GUEST: I was writing a name of a class identifier (this.variable) and the error occured on the moment that auto-complete was searching.



Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:143)
        at java.lang.StringBuilder.setLength(StringBuilder.java:55)
        at org.netbeans.modules.javascript.editing.JsCommentFormatter.<init>(JsCommentFormatter.java:108)
        at org.netbeans.modules.javascript.editing.JsCodeCompletion.document(JsCodeCompletion.java:1980)
        at org.netbeans.modules.gsfret.editor.hyperlink.GoToSupport$1.run(GoToSupport.java:159)
        at org.netbeans.modules.gsfret.editor.hyperlink.GoToSupport$1.run(GoToSupport.java:129)
Comment 1 jbsabmello 2008-10-22 13:54:36 UTC
Created attachment 72475 [details]
stacktrace
Comment 2 Petr Jiricka 2008-11-05 15:42:29 UTC
There are 45 duplicates, raising to P2!
Comment 3 Torbjorn Norbye 2008-11-07 01:52:34 UTC
Fixed in the trunk - changeset 1aa4af87da9b. Low risk fix, consider for patch 1 (or even FCS if there is still time, for that matter).
Comment 4 Torbjorn Norbye 2008-11-07 01:54:44 UTC
Mark fixed
Comment 5 rbalada 2008-11-14 10:11:04 UTC
Please verify this issue so it can be included in NetBeans 6.5 Patch1
Comment 6 pgebauer 2008-11-24 09:31:17 UTC
The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate.
Comment 7 pgebauer 2009-01-14 09:51:36 UTC
The issue hasn't passed the nomination process for 65patch2 by cut-off date. It has been moved to 65patch3.
Comment 8 Martin Schovanek 2009-02-27 08:06:53 UTC
v.
Comment 9 Erno Mononen 2009-03-02 15:53:48 UTC
Transplanted to release65_fixes: http://hg.netbeans.org/release65_fixes/rev/f4f6bb4e5304


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo