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

fix: attach annotation to CtCatchVariable #2984

Merged
merged 9 commits into from
May 27, 2019

Conversation

Egor18
Copy link
Contributor

@Egor18 Egor18 commented May 23, 2019

Fix #2934.
As far as I understand, CtCatch gets annotated and not CtCatchVariable because JDT does not actually have specific nodes representing catch and represents the whole catch as Argument of the Try node, so
Spoon creates CtCatch from Argument (and at that moment it gets processed and annotated) and only after that it creates CtVariable itself.
Since annotations cannot be attached to CtCatch itself, we can simply transfer them to CtCatchVariable.

@monperrus
Copy link
Collaborator

LGTM.

@nharrand you had a look at this with @gluckzhang, WDYT?

@monperrus monperrus changed the title Possible fix for #2934 fix: attach annotation to CtCatchVariable May 26, 2019
@nharrand
Copy link
Collaborator

Oops, I messed up the diff. Sorry about that. Anyway, yes LGTM too.
I'll merge if CI is happy!

@gluckzhang
Copy link
Contributor

Agree with this fix!

@nharrand nharrand merged commit f2ecd5d into INRIA:master May 27, 2019
@Egor18 Egor18 deleted the fixAnnotationOnCatch branch June 15, 2019 19:34
@monperrus monperrus mentioned this pull request Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Annotation on CtCatchVariable are attached to CtCatch instead
4 participants