Project: JDT
Bug 51540 "Encapuslate field" can fail when two variables in one variable declaration. [refactoring]
Reported: 2004-02-10 16:01:21 | Status: resolved fixed

Start with: public class Test { int fFoo, fBar; } "Encapsulate field..." fFoo. This yields in: public class Test { private int fFoo, fBar; void setFoo(int foo) { fFoo = foo; } int getFoo() { return fFoo; } } However, if some classes in the package refer to fBar, the code becomes uncompilable, because fBar is now private too....

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/SefWorkSpace/SefTests/base_in/TestTwoFragments.java org.eclipse.jdt.ui.tests.refactoring/resources/SefWorkSpace/SefTests/base_out/TestTwoFragments.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SefTests.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/SelfEncapsulateFieldRefactoring.java