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.
By testing the newly re-introduced beanedito in NB 6.1 RC2, I discovered that the when a method for a Pojo uses primitive types, the BeanInfo generator creates a wrong signature. For example I have a method: public void drawSpokedWheel(Graphics2D g2, int x, int y, int wheelSize, int tyreSize) ... the generated signature is: methods[METHOD_drawSpokedWheel0] = new MethodDescriptor(carpreview.CarPreview.class.getMethod("drawSpokedWheel", new Class[] {java.awt.Graphics2D.class, INT.class, INT.class, INT.class, INT.class})); // NOI18N which of course is wrong and won't compile. It should be: methods[METHOD_drawSpokedWheel0] = new MethodDescriptor(carpreview.CarPreview.class.getMethod("drawSpokedWheel", new Class[] {java.awt.Graphics2D.class, int.class, int.class, int.class, int.class})); // NOI18N or methods[METHOD_drawSpokedWheel0] = new MethodDescriptor(carpreview.CarPreview.class.getMethod("drawSpokedWheel", new Class[] {java.awt.Graphics2D.class, Integer.TYPE, Integer.TYPE, IInteger.TYPE, Integer.TYPE)); // NOI18N I have noticed this behavior whith all primitive types.
I forgot: once the BeanInfo has generated this "uncompilable" code, you can no longer save your beaninfo neither in the designer nor in the code, eventhough you fixed the error by removing the offending method from the beaninfo. No errors in the NB log file.
Temporary workaround: 1) in bean info editor exclude the problematic method 2) in the source editor manually add new element into method fields
Yep. Already using that workaround. Even though the "save" action doesn't work, strangely you can save your work in the beaninfo by using "save all"... That's another workaround.
The * is still shown in editor tab, but changes are stored -> I've reopened the issue 128969 which is related to this problem. I'm downgrading this to P2 in order not to block release of 6.1 but we definitely should fix it ASAP and include the fix in patch1
I will investigate.
Incorrect primitive type names fixed in dev build as http://hg.netbeans.org/main/rev/e16efb2f59ac With the applied fix I cannot reproduce the save issue again. Anyway I will track it as issue #128969.
verified in trunk
The fix has been ported into the release61_fixes branch: http://hg.netbeans.org/release61_fixes/rev/15215aaf23b2
*** Issue 134345 has been marked as a duplicate of this issue. ***
*** Issue 135220 has been marked as a duplicate of this issue. ***