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.
Build: NetBeans IDE Dev (Build 201309060001) VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b15 OS: Mac OS X User Comments: palman: custome creation of code Stacktrace: java.lang.NullPointerException at org.netbeans.modules.form.j2ee.QueryResultListCreator.getJavaCreationCode(QueryResultListCreator.java:139) at org.netbeans.modules.form.JavaCodeGenerator.generateComponentCreate(JavaCodeGenerator.java:1509) at org.netbeans.modules.form.JavaCodeGenerator.addCreateCode(JavaCodeGenerator.java:1164) at org.netbeans.modules.form.JavaCodeGenerator.regenerateInitComponents(JavaCodeGenerator.java:1016) at org.netbeans.modules.form.JavaCodeGenerator.regenerateCode(JavaCodeGenerator.java:3493) at org.netbeans.modules.form.RADComponent.rename(RADComponent.java:544)
Created attachment 139871 [details] stacktrace
Caused accidentally in 7c190d9e604c by introducing new method parameters when one of them (propNames) now hides a field of the same name that was used so far, but now the parameter is used instead which is always null. (It's a shame there's no warning in java editor about this.) This makes the JPA-related components unusable, code generation always fails when there is any property set. Fixed by making the field name different from the local parameter name, i.e. returning to previous correct behavior. http://hg.netbeans.org/jet-main/rev/a3f28af28d8a
Can be tested simply by adding e.g. the 'Query' component from palette (Java Persistence category) to a form, setting the query property to anything and then switching the form to Source - which invoke code generation. It fails before this fix.
Transplanted to release74: http://hg.netbeans.org/releases/rev/11d77bb7bf30