Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 242717 - NullPointerException at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitNewClass
NullPointerException at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidato...
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Compiler
8.0
All All
: P2 (vote)
: 8.1
Assigned To: Dusan Balek
issues@java
EXCEPTIONS_REPORT
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-09 16:55 UTC by frederic.gendebien
Modified: 2015-07-19 23:22 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (6.19 KB, text/plain)
2014-03-09 16:55 UTC, frederic.gendebien
Details
dump file (24.21 KB, application/octet-stream)
2015-07-19 23:22 UTC, clinuxrulz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description frederic.gendebien 2014-03-09 16:55:19 UTC
Build: NetBeans IDE 8.0 Beta (Build 201401141042)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b69, Java(TM) SE Runtime Environment, 1.8.0-b127
OS: Mac OS X

User Comments:
GUEST: Filling in constructor args.

frederic.gendebien: I was creating an anonymous class of type Comparator and when I used completion to generate the body I received a NPE

GUEST: Was finding and replacing TreeSet with ArrayList. Error just popped up then. I can't see a major issue though.

GUEST: delete some java class, and open the java file which need dependent the deleted classes, error reported




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitNewClass(Attr.java:4667)
   at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1516)
   at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
   at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
   at com.sun.tools.javac.tree.TreeScanner.visitNewClass(TreeScanner.java:207)
   at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitNewClass(Attr.java:4672)
Comment 1 frederic.gendebien 2014-03-09 16:55:22 UTC
Created attachment 145883 [details]
stacktrace
Comment 2 Exceptions Reporter 2014-08-21 16:04:54 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=206745
Comment 3 Exceptions Reporter 2014-12-12 08:52:36 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=206745
Comment 4 Dusan Balek 2015-02-09 09:44:55 UTC
Fixed in jet-main.

http://hg.netbeans.org/main/nb-javac/rev/4d2222373842
Comment 5 clinuxrulz 2015-07-19 23:22:50 UTC
Created attachment 154715 [details]
dump file

The code uses T_, T__, ... to simulate high order generics. That seems to be crashing netbeans parser, even though javac compiles it fine.


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