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 267271 - StringIndexOutOfBoundsException: String index out of range: -2
Summary: StringIndexOutOfBoundsException: String index out of range: -2
Status: NEW
Alias: None
Product: third-party
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@third-party
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-23 17:19 UTC by Exceptions Reporter
Modified: 2016-07-27 15:28 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 224748


Attachments
stacktrace (6.75 KB, text/plain)
2016-07-23 17:19 UTC, Exceptions Reporter
Details
stacktrace (6.75 KB, text/plain)
2016-07-27 15:28 UTC, yinzara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2016-07-23 17:19:20 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.65-b01, Java(TM) SE Runtime Environment, 1.8.0_65-b17
OS: Windows 7

User Comments:
javatlacati: Double clicked File to open

GUEST: when refactoring

javatlacati: Openes a Java File from Typescript File

GUEST: it appears again

GUEST: not again!!!

javatlacati: Double Clicked Java File from Another project to open




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
   at java.lang.String.substring(String.java:1967)
   at eu.hlavki.netbeans.editor.unicode.Native2AsciiHint.run(Native2AsciiHint.java:55)
   at sun.reflect.GeneratedMethodAccessor114.invoke(GeneratedMethodAccessor114.java:0)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
   at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:339)
Comment 1 Exceptions Reporter 2016-07-23 17:19:22 UTC
Created attachment 161397 [details]
stacktrace
Comment 2 Svata Dedic 2016-07-25 07:44:37 UTC
Caused by native2ascii 3rd party plugin. Possibly provoked by some changes in compiler which reports positions differently. 

Based on code, I've tried to reproduce the defect with 1-char String -- but everything worked OK for me. Pls. include examples.
Comment 3 yinzara 2016-07-27 15:28:14 UTC
Created attachment 161468 [details]
stacktrace

No idea