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 269376

Summary: StringIndexOutOfBoundsException: String index out of range: -292
Product: java Reporter: muellermi <muellermi>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal CC: muellermi
Priority: P3    
Version: Dev   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 226597
Attachments: stacktrace
stacktrace

Description muellermi 2016-12-16 21:52:09 UTC
Build: NetBeans IDE Dev (Build 201612160001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.111-b14, Java(TM) SE Runtime Environment, 1.8.0_111-b14
OS: Linux

User Comments:
muellermi: invoking autocompletion on a stream (ctrl+space after the last dot)
[3]-> pm.getPersons().stream().filter(p -> p.)

GUEST: ctrl-space in jsp




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -292
   at java.lang.String.substring(String.java:1967)
   at org.netbeans.modules.java.completion.BaseTask.getEnvImpl(BaseTask.java:369)
   at org.netbeans.modules.java.completion.BaseTask.getCompletionEnvironment(BaseTask.java:266)
   at org.netbeans.modules.java.completion.JavaCompletionTask.resolve(JavaCompletionTask.java:284)
   at org.netbeans.modules.java.completion.BaseTask.run(BaseTask.java:93)
   at org.netbeans.modules.java.completion.JavaCompletionTask.run(JavaCompletionTask.java:80)
Comment 1 muellermi 2016-12-16 21:52:12 UTC
Created attachment 163269 [details]
stacktrace
Comment 2 muellermi 2016-12-16 21:54:55 UTC
Created attachment 163270 [details]
stacktrace

as before
Comment 3 Exceptions Reporter 2018-01-29 15:47:17 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=226597