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 225915

Summary: NullPointerException at com.sun.tools.javac.jvm.Code.typecode
Product: java Reporter: Exceptions Reporter <exceptions_reporter>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: adithyank, csjunker, janario, jmichelberger, MackSix, sreimers, tboudreau
Priority: P2    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 198457
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description Exceptions Reporter 2013-02-08 19:59:25 UTC
This bug was originally marked as duplicate of bug 185366, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b17, Java(TM) SE Runtime Environment, 1.8.0-ea-b75
OS: Windows 7

Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.jvm.Code.typecode(Code.java:227)
   at com.sun.tools.javac.jvm.Items$Item.coerce(Items.java:262)
   at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:842)
   at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:859)
   at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1693)
   at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1324)
Comment 1 Exceptions Reporter 2013-02-08 19:59:26 UTC
Created attachment 131174 [details]
stacktrace
Comment 2 sreimers 2013-05-15 11:28:55 UTC
Created attachment 134461 [details]
stacktrace

Background parsing
Comment 3 sreimers 2013-05-17 13:10:58 UTC
Created attachment 134566 [details]
stacktrace

Parsing
Comment 4 Exceptions Reporter 2013-05-17 13:11:02 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=198457
Comment 5 jmichelberger 2013-06-03 10:22:27 UTC
Created attachment 135256 [details]
stacktrace

Starting again...
Comment 6 _ tboudreau 2013-06-08 05:04:29 UTC
Created attachment 135531 [details]
stacktrace

Pasted two packages from a NetBeans module suite project into a NetBeans maven module project
Comment 7 Exceptions Reporter 2013-06-13 13:43:37 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=198457
Comment 8 MackSix 2013-07-07 14:32:37 UTC
Created attachment 136778 [details]
stacktrace

1. Inspect & Transform>>"If-Else Statements Should Use Braces". 
2. Preview
3. Close Project
4. Refactor
5. Undo I & T
6. Open Project
This NPE happened
Comment 9 MackSix 2013-07-07 14:38:37 UTC
Created attachment 136779 [details]
stacktrace

Created new free-form project from jEdit 5.1pre1 source code and this NPE happend during scanning.
Comment 10 MackSix 2013-07-07 21:35:37 UTC
Created attachment 136791 [details]
stacktrace

On free-form project made from jEdit 5.1pre1 source:
1. Ran I&T>>Check for string comparison using == or !=
2. Refactor
3. Undo
4. Ran I&T>>If-Else should use bracses
5. Refactor
6. Undo
This NPE happened.
Comment 11 MackSix 2013-07-07 21:44:11 UTC
This is the source code I used to set up a new Free-Form project that makes the NPE.

http://sourceforge.net/projects/jedit/files/jedit-devel/5.1pre1/jedit5.1pre1source.tar.bz2/download
Comment 12 janario 2013-07-09 21:03:20 UTC
Created attachment 136901 [details]
stacktrace

.
Comment 13 Jan Lahoda 2013-07-12 08:56:29 UTC
Trivial testcase:
----
package pkgenum;

@Undefined
public enum Enum {
    A;
}
----
Comment 14 Exceptions Reporter 2013-07-17 18:57:42 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=198457
Comment 15 adithyank 2013-07-19 10:12:42 UTC
Created attachment 137432 [details]
stacktrace

when saving a java file
Comment 17 Quality Engineering 2013-07-27 02:20:02 UTC
Integrated into 'main-silver', will be available in build *201307262300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/99a797eca004
User: Dusan Balek <dbalek@netbeans.org>
Log: Issues #225915, #233046, #233194, and #233229 fixed.