Project: JDT
Bug 20017 Self Encapsulate does not work correctly when "this.field = value" is used before refactoring [refactoring]
Reported: 2002-06-12 10:13:35 | Status: resolved fixed

As an example I start with this class: public class Test { private Object obj; public Test (Object obj) { this.obj = obj; } } Then apply the "Self Encapsulate" refactoring on the obj field, which results: public class Test { private Object obj; public Test (Object obj) { this.getObj() = obj; } private void setObj(Object obj) { this.obj = obj; } private Object getObj() { return obj; } } The "this.getObj() = obj;" in the constructor should be "setObj(obj);" correctly. My Eclipse version was: 20020602

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/SefWorkSpace/SefTests/A.java org.eclipse.jdt.ui.tests.refactoring/resources/SefWorkSpace/SefTests/base_in/TestThisExpression.java org.eclipse.jdt.ui.tests.refactoring/resources/SefWorkSpace/SefTests/base_in/TestThisExpressionInner.java org.eclipse.jdt.ui.tests.refactoring/resources/SefWorkSpace/SefTests/base_out/TestThisExpression.java org.eclipse.jdt.ui.tests.refactoring/resources/SefWorkSpace/SefTests/base_out/TestThisExpressionInner.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/AbstractSelectionTestCase.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractInterfaceTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractMethodTestSetup.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractMethodTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractTempTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineTempTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveMembersTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/PullUpTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RefactoringScannerTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RefactoringTest.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameJavaProjectTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenamePackageTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameSourceFolderChangeTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameTempTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameTypeTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ReorgTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SefTestSetup.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SefTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SurroundWithTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/AccessAnalyzer.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/EncapsulateWriteAccess.java