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 203892 - [71cat] NullPointerException at com.sun.tools.javac.tree.JCTree$JCClassDecl.getKind
Summary: [71cat] NullPointerException at com.sun.tools.javac.tree.JCTree$JCClassDecl.g...
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: issues@contrib
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 11:36 UTC by dbell
Modified: 2015-11-19 07:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182087


Attachments
stacktrace (11.85 KB, text/plain)
2011-10-18 11:37 UTC, dbell
Details
Screenshot of odd code completion suggestions (131.93 KB, image/png)
2011-10-18 11:39 UTC, dbell
Details
stacktrace (10.25 KB, text/plain)
2015-01-22 12:51 UTC, markiewb
Details
stacktrace (9.62 KB, text/plain)
2015-06-02 06:26 UTC, ehsavoie
Details
stacktrace (11.14 KB, text/plain)
2015-11-19 07:32 UTC, ehsavoie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dbell 2011-10-18 11:36:58 UTC
Build: NetBeans IDE Dev (Build 201110140600)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02-383, Java(TM) SE Runtime Environment, 1.6.0_26-b03-383-11A511
OS: Mac OS X

User Comments:
dbell: Where variable exist: 
CompletionContext context
CompletionModel comptionModel
List<CompletionResultItem> results

And no variable exists: 
substitutionElement

Invoked code completion as indicated by carat:
addNSAwareCompletionItems(|substitutionElement, context, completionModel, results);

Where target method signature is:
private static void addNSAwareCompletionItems(AXIComponent axi, CompletionContextImpl context, CompletionModel cm, List<CompletionResultItem> results)


Code completion suggestions were sane: first giving a list of appropriately-typed variables for the "axi" parameter, then methods with appropriate return types for the "axi" parameter, then a separator, then all other variables/methods in scope. Above all of those suggestions, however, were two suggestions which were not sane:

{ org.netbeans.modules.xml.axi.visitor.AXIVisitor => }
addNSAwareCompletionItems(AXIComponent axi, CompletionContextImpl context, CompletionModel cm, List<CompletionResultItem> results) void




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.tree.JCTree$JCClassDecl.getKind(JCTree.java:598)
   at com.sun.source.util.TreePath.<init>(TreePath.java:89)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:65)
   at org.netbeans.api.java.source.WorkingCopy$2.scan(WorkingCopy.java:421)
   at org.netbeans.api.java.source.WorkingCopy$2.scan(WorkingCopy.java:379)
   at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
Comment 1 dbell 2011-10-18 11:37:01 UTC
Created attachment 112171 [details]
stacktrace
Comment 2 dbell 2011-10-18 11:39:38 UTC
Created attachment 112172 [details]
Screenshot of odd code completion suggestions
Comment 3 Dusan Balek 2011-10-19 14:19:46 UTC
It seems you have the Extended Java Editor module installed.
Comment 4 markiewb 2015-01-22 12:51:45 UTC
Created attachment 151617 [details]
stacktrace

Code completion for lambda
Comment 5 Exceptions Reporter 2015-01-22 12:51:52 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=182087
Comment 6 ehsavoie 2015-06-02 06:26:00 UTC
Created attachment 154001 [details]
stacktrace

Selecting to fill a stream expression with a lambda
Comment 7 ehsavoie 2015-11-19 07:32:52 UTC
Created attachment 157403 [details]
stacktrace

Trying to introduce lambda as consumer in directorystream.forEach