-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix move method to handle field access modifier adjustment (#1427)
* Fix move method to handle field access modifier adjustment - fix MoveInstanceMethodProcessor.createMethodBody() to perform any needed adjustments to field modifiers if required by the move - add new test to MoveInstanceMethodTests - fixes #1297
- Loading branch information
Showing
4 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test79/in/A.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class B { | ||
public void f() { | ||
|
||
} | ||
} | ||
|
||
class A { | ||
B b; | ||
private int c; | ||
|
||
public void m() { | ||
n(c); | ||
} | ||
|
||
private void n(int x) { | ||
|
||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test79/out/A.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class B { | ||
public void f() { | ||
|
||
} | ||
|
||
public void m(A a) { | ||
a.n(a.c); | ||
} | ||
} | ||
|
||
class A { | ||
B b; | ||
int c; | ||
|
||
void n(int x) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters