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 252033 - NullPointerException at com.sun.tools.javac.comp.MemberEnter$Synthesizer.visitIdent
Summary: NullPointerException at com.sun.tools.javac.comp.MemberEnter$Synthesizer.visi...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-23 18:05 UTC by theshadow27
Modified: 2015-04-30 15:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 216944


Attachments
stacktrace (7.80 KB, text/plain)
2015-04-23 18:05 UTC, theshadow27
Details
stacktrace (7.80 KB, text/plain)
2015-04-23 18:11 UTC, theshadow27
Details
stacktrace (7.80 KB, text/plain)
2015-04-23 18:20 UTC, theshadow27
Details
testcase project Bug252033: mvn project (7.84 KB, application/zip)
2015-04-24 12:03 UTC, theshadow27
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theshadow27 2015-04-23 18:05:23 UTC
Build: NetBeans IDE Dev (Build 201504230001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b17
OS: Mac OS X

User Comments:
theshadow27: Typing 'public class ...




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.comp.MemberEnter$Synthesizer.visitIdent(MemberEnter.java:1728)
   at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2017)
   at com.sun.tools.javac.comp.MemberEnter$Synthesizer.visit(MemberEnter.java:1710)
   at com.sun.tools.javac.comp.MemberEnter$9.getModelType(MemberEnter.java:1692)
   at com.sun.tools.javac.code.Symbol$ClassSymbol.getSuperclass(Symbol.java:1095)
   at com.sun.tools.javac.code.Symbol$ClassSymbol.getSuperclass(Symbol.java:925)
Comment 1 theshadow27 2015-04-23 18:05:24 UTC
Created attachment 153335 [details]
stacktrace
Comment 2 theshadow27 2015-04-23 18:11:07 UTC
Created attachment 153336 [details]
stacktrace

Trying to duplicate problem... still unsure
Comment 3 theshadow27 2015-04-23 18:20:09 UTC
Created attachment 153337 [details]
stacktrace

Still trying to duplicate repeatibly. The issues seems to be consistantly triggered when typing a space between 'class' and 'extends'

public class[SPACE HERE]extends AbstractSomethingClass {..}

The AbstractSomethingClass was in a Maven dependancy that I removed. I went to delete the "extends AbstractSomethingClass" part, but accidentially deleted the "public class ConcreteSomethingClass" part instead. In typing it back (without removing "extends") I got this exception. 

Without saving this particular file, it seems to be 100% reproduceable. But when I copy the same source to my sandbox (Issuzilla testcase) project, I can't duplicate the exception. I will continue to try to get a good test case for this...
Comment 4 theshadow27 2015-04-24 12:03:13 UTC
Created attachment 153366 [details]
testcase project Bug252033: mvn project

The zipped maven project has 2 files, one .java and the .pom. 

The test case depends on you removing the dependency from the POM and saving.

Then you delete the class name ('Main') from the class.

This triggers the NPE every time.
Comment 6 Quality Engineering 2015-04-29 02:32:42 UTC
Integrated into 'main-silver', will be available in build *201504290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/487a2aa1c1be
User: Dusan Balek <dbalek@netbeans.org>
Log: Issues #251886, #252026, and #252033 - fixed.
Comment 7 theshadow27 2015-04-30 15:31:06 UTC
Confirmed fix in 201504290001 - thanks