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 246371 - NullPointerException at org.netbeans.modules.java.editor.codegen.ConstructorGenerator.doGenerateConstructor
Summary: NullPointerException at org.netbeans.modules.java.editor.codegen.ConstructorG...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Dusan Balek
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2014-08-10 19:17 UTC by adithyank
Modified: 2014-08-13 12:35 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 211170


Attachments
stacktrace (4.89 KB, text/plain)
2014-08-10 19:17 UTC, adithyank
Details
stacktrace (4.63 KB, text/plain)
2014-08-11 09:01 UTC, ehsavoie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adithyank 2014-08-10 19:17:02 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-1995-on-20140809)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.5-b02, Java(TM) SE Runtime Environment, 1.8.0_05-b13
OS: Linux

User Comments:
adithyank: While adding constructor for an inner class through ALT+INSERT




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.java.editor.codegen.ConstructorGenerator.doGenerateConstructor(ConstructorGenerator.java:220)
   at org.netbeans.modules.java.editor.codegen.ConstructorGenerator.access$200(ConstructorGenerator.java:90)
   at org.netbeans.modules.java.editor.codegen.ConstructorGenerator$1.run(ConstructorGenerator.java:204)
   at org.netbeans.modules.java.editor.codegen.ConstructorGenerator$1.run(ConstructorGenerator.java:202)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:649)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:639)
Comment 1 adithyank 2014-08-10 19:17:05 UTC
Created attachment 148624 [details]
stacktrace
Comment 2 ehsavoie 2014-08-11 09:01:49 UTC
Created attachment 148637 [details]
stacktrace

Trying to generate a constructor in a class
Comment 3 ehsavoie 2014-08-11 12:04:06 UTC
The class has an inner class, no pre-existing constructor :
https://github.com/ehsavoie/wildfly-core/blob/WFLY-543/controller/src/main/java/org/jboss/as/controller/BootErrorCollector.java
Comment 4 markiewb 2014-08-11 12:06:22 UTC
Marked as Regression -> P2. It used to work in 8.0

FYI: It is not limited to inner classes. Even the constructor of simple classes like cannot be created. (The dialog shows up, you can choose the members, but the concreate creation fails.)
----
package asdf;

public class Asdf
{
    String a;
}
----
Comment 5 Jiri Prox 2014-08-11 12:07:45 UTC
reproducible

Dusane, can we fix it to 8.0.1, please?
Comment 6 Dusan Balek 2014-08-11 13:14:34 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/ee8909f072fb
Comment 7 Antonin Nebuzelsky 2014-08-11 13:49:03 UTC
+1 for 8.0.1
Comment 8 Jiri Prox 2014-08-11 13:51:53 UTC
verified in dev
Comment 9 Quality Engineering 2014-08-12 02:32:13 UTC
Integrated into 'main-silver', will be available in build *201408120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ee8909f072fb
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #246371: NullPointerException at org.netbeans.modules.java.editor.codegen.ConstructorGenerator.doGenerateConstructor - fixed.
Comment 10 Dusan Balek 2014-08-12 07:49:42 UTC
Integrated into 'release801'.

http://hg.netbeans.org/releases/rev/55725b430e78
Comment 11 Quality Engineering 2014-08-13 02:11:01 UTC
Integrated into 'releases/release801', will be available in build *201408122300* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/55725b430e78
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #246371: NullPointerException at org.netbeans.modules.java.editor.codegen.ConstructorGenerator.doGenerateConstructor - fixed.
Comment 12 Jiri Prox 2014-08-13 12:35:44 UTC
verified in 8.0.1