Skip to content

refactor: import of CtRole#2132

Merged
monperrus merged 1 commit intoINRIA:masterfrom
surli:refactor-import-ctrole
Jun 28, 2018
Merged

refactor: import of CtRole#2132
monperrus merged 1 commit intoINRIA:masterfrom
surli:refactor-import-ctrole

Conversation

@surli
Copy link
Copy Markdown
Collaborator

@surli surli commented Jun 28, 2018

This PR is related to #2100

We used a lot this of construction in our code:

import CtRole;
import static CtRole.AROLE;

@myRole(role = CtRole.AROLE);
public void method() {
  aCall(AROLE);
}

This is perfectly correct code, but it's a kind of redundancy to import twice CtRole where we used only the static field already imported.
Moreover the import mechanism will align all this behaviour to only one import, which is the static one.
Then as we got now one test to check that Spoon imports and computed imports are the same, I propose to refactor to only use the import of the static field.

@monperrus monperrus merged commit 2671993 into INRIA:master Jun 28, 2018
@surli surli mentioned this pull request Jul 4, 2018
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 this pull request may close these issues.

2 participants