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.
If in inner class in method, completions should include non-final objects in scope and automatically final them if necessary. Example: public void testLongDescription() { System.out.println("testLongDescription"); Wizard w = WizardPage.createWizard(new Class[] { AP.class }); EventQueue.invokeAndWait(new Runnable() { public void run() { WizardDisplayer.showWizard(w); } }); String s = w.getLongDescription("one"); assertEquals ("LONG DESCRIPTION", ((AP) jc).getLongDescription()); assertEquals ("LONG DESCRIPTION", s); } I am adding the EventQueue.invokeAndWait() call and creating the runnable. I complete WizardDisplayer.showWizard(), which takes an argument of Wizard. The variable w is in scope, but it is not final. So code completion supplies a bogus variable "wizard". It would be better if it would offer "w" and if I accept it, it would add "final" before the line beginning "Wizard w".