Project: JDT
Bug 189394 [clean up] Does not remove unused local variable if assignment
Reported: 2007-05-28 06:13:59 | Status: resolved fixed

I20070525-0010 Given: package e; import java.util.Random; public class A { public void foo() { Random ran= new Random(); } } 1. Run Source>Clean Up... 2. Select 'Remove unused local variables' Is: No changes Should: public void foo() { new Random(); }

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpStressTest.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java