Pulling up static members does not update references qualified with the class name correctly, which can break the code. Example:
public class X {}
public class Y extends X {
privatestaticint x = 0;
publicstaticint getX() {
return x;
}
publicstatic void setX(int x) {
Y.x = x;
}
}
Pulling up all (static) members produces:
public class X {
privatestaticint x = 0;
publicstaticint getX() {
return x;
}
publicstatic void setX(int x) {
Y.x = x; // does not compile, should be X.x = x;
}
}
class Y extends X {}
This does not compile. To make matters worse the uncompilable code is green in the editor, see IDEA-16937. This issue may also be related to IDEABKL-4822
Description
Pulling up static members does not update references qualified with the class name correctly, which can break the code. Example:
public class X {}
public class Y extends X {
privatestaticint x = 0;
publicstaticint getX() {
return x;
}
publicstatic void setX(int x) {
Y.x = x;
}
}
Pulling up all (static) members produces:
public class X {
privatestaticint x = 0;
publicstaticint getX() {
return x;
}
publicstatic void setX(int x) {
Y.x = x; // does not compile, should be X.x = x;
}
}
class Y extends X {}
This does not compile. To make matters worse the uncompilable code is green in the editor, see IDEA-16937. This issue may also be related to IDEABKL-4822