You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DongChunHao This is not failing. The move member actually issues a warning that "The visibility of field "tests.SourceClass.value" will be changed to package." This change is made when you choose OK and makes the move work. Is it possible this is a failure in jdt.ls or vscode?
Compilation error occurred when moving dependentMethod() to TargetClass class
class SourceClass {
private int value;
TargetClass c;
public void setValue(int value) {
this.value = value;
}
// remove dependentMethod() to TargetClass
public void dependentMethod() {
System.out.println("Dependent method: " + value);
}
}
class TargetClass {
public void callDependentMethod() {
SourceClass source = new SourceClass();
source.dependentMethod();
}
}
Refactoring results:
The text was updated successfully, but these errors were encountered: