Project: JDT
Bug 258072 [quick fix] Dead code detection quick fix leaves behind the curly braces
Reported: 2008-12-09 08:57:57 | Status: resolved fixed

The quick fix for the dead code detection removes the code as well as the condition, which works in case of only 'if' block but if an 'if-else ' block is used it leaves behind the curly braces with the valid code. Try this simple test case: if (false){ x= 1; }else { x= 0; } then click on remove in the quick fix. It leaves this : { x= 0; }

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java