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 258861 - Misspelled "try" keyword causes NullPointerException at com.sun.source.util.TreePathScanner.scan when invoking code completion
Summary: Misspelled "try" keyword causes NullPointerException at com.sun.source.util.T...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-15 17:39 UTC by Chiana
Modified: 2016-06-20 13:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 222494


Attachments
stacktrace (2.14 KB, text/plain)
2016-04-15 17:39 UTC, Chiana
Details
stacktrace (2.14 KB, text/plain)
2016-04-15 17:44 UTC, Chiana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2016-04-15 17:39:14 UTC
Build: NetBeans IDE Dev (Build 201604080001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b62, Java(TM) SE Runtime Environment, 1.8.0-ea-b120
OS: Windows 8

User Comments:
GUEST: ordinary programming, no idea

Chiana: Was trying to make a catch statement for catching an OOM typed "catch (Ou" and then control-space




Stacktrace: 
java.lang.NullPointerException
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:53)
   at org.netbeans.api.java.source.TreeUtilities.getUncaughtExceptions(TreeUtilities.java:782)
   at org.netbeans.modules.java.completion.JavaCompletionTask.insideCatch(JavaCompletionTask.java:1838)
   at org.netbeans.modules.java.completion.JavaCompletionTask.resolve(JavaCompletionTask.java:349)
   at org.netbeans.modules.java.completion.BaseTask.run(BaseTask.java:92)
   at org.netbeans.modules.java.completion.JavaCompletionTask.run(JavaCompletionTask.java:80)
Comment 1 Chiana 2016-04-15 17:39:15 UTC
Created attachment 159285 [details]
stacktrace
Comment 2 Chiana 2016-04-15 17:41:24 UTC
Noted that I had misspelled the "try" keyword as "Try", can be a cause
Comment 3 Chiana 2016-04-15 17:44:25 UTC
Seems like a misspelled "try" keyword causes NPE when invoking CC
Comment 4 Chiana 2016-04-15 17:44:56 UTC
Created attachment 159286 [details]
stacktrace

Yep, thats the problem; Misspelled try keyword causes NPE when invoking codeCompletion
Comment 5 Exceptions Reporter 2016-06-19 08:48:22 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=222494
Comment 6 Dusan Balek 2016-06-20 13:38:26 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/cc358b3191ab