-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check to move member in case member moved to non-public class (#1407
) * Add check to move member in case member moved to non-public class - flag any references to a moved member where the move will be to a package-private class that is referenced by a field since the access in another package will cause an error - add new failure test to MoveInstanceMethodTests - fixes #1404
- Loading branch information
Showing
6 changed files
with
117 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
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
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
...pse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/cannotMove/testFail17/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 @@ | ||
package p1; | ||
|
||
class A1 extends A { | ||
|
||
} | ||
|
||
public class InputClass { | ||
|
||
A1 a1; | ||
|
||
int value = 6; | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
} | ||
|
11 changes: 11 additions & 0 deletions
11
...pse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/cannotMove/testFail17/in/B.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,11 @@ | ||
package p2; | ||
|
||
import p1.A; | ||
|
||
public class B { | ||
|
||
public void foo() { | ||
A a = new A(); | ||
a.getValue(); | ||
} | ||
} |
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