Skip to content

REVIEW fix: CtAnnotation#getValue returns the default value if one exists #2034

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

Merged
merged 3 commits into from
Jun 5, 2018

Conversation

monperrus
Copy link
Collaborator

@monperrus monperrus commented Jun 5, 2018

Fix #2029

@monperrus monperrus changed the title fix: CtAnnotation#getValue returns the default value if one exists REVIEW fix: CtAnnotation#getValue returns the default value if one exists Jun 5, 2018
}
}
if (type.isArray() && ret != null && ret.getClass() != type) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure with the removal of this piece of code? It seems related with the contract with annotation and arrays changed in #1935

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the contract of #1935 is implemented at https://github.com/INRIA/spoon/pull/2034/files#diff-94d063d96db752ab6c7a094f53c75aceR395

do you see a missing test case to specify this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK so you move the creation of the new array. It looks ok then. Merge?

@monperrus
Copy link
Collaborator Author

monperrus commented Jun 5, 2018 via email

@pvojtechovsky pvojtechovsky merged commit b898c65 into INRIA:master Jun 5, 2018
@pvojtechovsky
Copy link
Collaborator

Thank you ;-)

@surli surli mentioned this pull request Jun 25, 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.

3 participants