Community
Participate
Working Groups
Given this snippet: import java.beans.Encoder; class ExtractMethodBug { void a() { Encoder encoder = new Encoder(); encoder.remove( null ); } void b() { Encoder encoder = new Encoder(); encoder.remove( null ); if( encoder.getExceptionListener() != null ) { } } } Select the entire body of method 'a' and select Extract Method. Make sure to check the 'Replace additional occurrences' option. The extracted method returns void instead of the new instance and the code in method 'b' does not compile because the 'encoder' variable cannot be resolved.
Reproducible in Eclipse 3.8 also.
*** This bug has been marked as a duplicate of bug 479559 ***