Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error: the caller of a static field is removed during spooning a class. #816

Closed
giphon opened this issue Sep 6, 2016 · 0 comments · Fixed by #819
Closed

Compiling error: the caller of a static field is removed during spooning a class. #816

giphon opened this issue Sep 6, 2016 · 0 comments · Fixed by #819

Comments

@giphon
Copy link

giphon commented Sep 6, 2016

Compiling error. The caller of a static field is removed during Spooning a class. Under Spoon 5.2.0.

Given two input classes A and B as follows, even process with an empty processor, the spooned files will remove the caller.

// Input class A
package temp;
public class A {
        public static int myField = 3;
}
// Input class B
package temp.b;
import temp.A;
public class B {
        static {
        A.myField = 5;
    }
}

The output is as follows. The caller of myField is removed. I guess A.myField is treated as this.myField.

// Output class A
package temp.b;
public class B {
    static {
        myField = 5;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant