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.
Bean info is generated incorrectly, there are doubled return statements in some methods. Steps to reproduce: 1) create new empty class 2) generate beaninfo for it -> here are the first 3 method from the generated class, notice that the return statements are doubled. (fortunately the firs return is not in guarded block and can be deleted) private static BeanDescriptor getBdescriptor(){ BeanDescriptor beanDescriptor = new BeanDescriptor ( javaapplication22.JavaApplication22.class , null ); // NOI18N // Here you can add code for customizing the BeanDescriptor. return beanDescriptor; return beanDescriptor; } // Property identifiers // Property array /*lazy PropertyDescriptor*/ private static PropertyDescriptor[] getPdescriptor(){ PropertyDescriptor[] properties = new PropertyDescriptor[0]; // Here you can add code for customizing the properties array. return properties; return properties; } // EventSet identifiers // EventSet array /*lazy EventSetDescriptor*/ private static EventSetDescriptor[] getEdescriptor(){ EventSetDescriptor[] eventSets = new EventSetDescriptor[0]; // Here you can add code for customizing the event sets array. return eventSets; return eventSets; } Product Version: NetBeans IDE Dev (Build 20111115-fe19723f7bc6) Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb) User directory: D:\udir3 Cache directory: D:\udir3\var\cache
*** Bug 205306 has been marked as a duplicate of this bug. ***
strange, this code was not touched for years
Jesse, it is yours I guess: The templates are screwed up. Steps to reproduce: Create New | Java Beans Object | BeanInfo BeanInfo should be created with some parts in guarded sections, but instead of guarded sections you can see //GEN-END and similar comments The problem is, that some special comments are commented out. Don't know, how many templates are corrupted. This was caused by this commit: http://hg.netbeans.org/main-golden/rev/d4c6057a3f4f
(In reply to comment #3) > Create New | Java Beans Object | BeanInfo > BeanInfo should be created with some parts in guarded sections, but instead of > guarded sections you can see //GEN-END and similar comments > The problem is, that some special comments are commented out. Indeed you do. But when you restart the IDE the guarded blocks appear normally, so this is a bug in the editor. > This was caused by this commit: > http://hg.netbeans.org/main-golden/rev/d4c6057a3f4f No, that commit did not change the contents of the template. Anyway this is not clearly related to the originally reported bug, which is about generating BI for an existing class; creating a BI from File > New File does not result in uncompilable code.
Shouldn't it be marked with 71_HR_FIX_CANDIDATE?
This bug *WAS* probably caused by Jesse's changes in templates. JavaBeans templates are not recognized as Beans Data Objects. It never worked transparently by after recent changes those hacks stopped working.
Changeset: http://hg.netbeans.org/jet-main/rev/b16466f072eb Author: Jan Becicka <jbecicka@netbeans.org> Date: 2011-11-23 10:33 Message: Issue #205211 - Bean info generated incorrectly
Why TM was changed to 7.2? It is supposed to be fixed for 7.1.
(In reply to comment #8) > Why TM was changed to 7.2? It is supposed to be fixed for 7.1. Because it's fixed in 7.2, we will change it to 7.1 once the fix is integrated into release71 branch (it's 71_HR_FIX_CANDIDATE and it will be definitely delivered in 7.1)
Thanks for the clarification :)
For the record: I think the patch is fine.
verified in trunk. Still there are some formatting problem, but only a minor ( closing bracket is not on separate line) but it only a minor problem. I'll file separate issue for it.
integrated into release71 http://hg.netbeans.org/releases/rev/bb211e0ba4d1
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/b16466f072eb User: Jan Becicka <jbecicka@netbeans.org> Log: Issue #205211 - Bean info generated incorrectly
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/bb211e0ba4d1 User: Jan Becicka <jbecicka@netbeans.org> Log: Issue #205211 - Bean info generated incorrectly (transplanted from b16466f072ebbdf7653f5b227e9a4ca44336528d)
verified