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.
The 3.5beta version of NB generates wrong code for an action listener: try { panelAlarmFiltering.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed (java.awt.event.ActionEvent evt) { panelAlarmFilteringActionPerformed(evt); } }} catch (java.util.TooManyListenersException e1) { e1.printStackTrace(); } ); The closing brace of addActionListener ");" and the closing curly brace of the catch statement are swapped. With NB 3.4.1 I get: try { panelAlarmFiltering.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed (java.awt.event.ActionEvent evt) { panelAlarmFilteringActionPerformed(evt); } }); } catch (java.util.TooManyListenersException e1) { e1.printStackTrace(); }
It is reproducible in 3.5 Beta build and it needs to be fixed in 3.5 - there is no way to repair the malformed code.
I see. It's really shame I integrated such a bug... However it's just a trivial typo, the fix is quite simple (swapping two lines, I'll attach the diff).
Created attachment 10066 [details] binary patch (for both trunk and 3.5)
Fixed in trunk. /cvs/form/src/org/netbeans/modules/form/JavaCodeGenerator.java new revision: 1.127; previous revision: 1.126
Created attachment 10067 [details] context diff for release35
I have checked the fix and it should be OK.
QA-result of checking: The patch works perfectly (tested in #200304212350).
approved for 3.5
Integrated to release35. /cvs/form/src/org/netbeans/modules/form/JavaCodeGenerator.java new revision: 1.125.2.2; previous revision: 1.125.2.1
Verified in RC1(build 200304282350) of NetBeans3.5