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

AnnotationMatch will match annotations. #470

Closed
wants to merge 1 commit into from
Closed

Conversation

traceyyoshima
Copy link
Contributor

Changes:

  • AnnotationMatch will match annotations.
  • Added mapType to KotlinTreeParserVisitor.
    • In preparation for https://github.com/openrewrite/rewrite-kotlin/issues/464, and various places in the visitor where we manually update types.
  • Fixed potential NPE.
  • Removed DataFlowIssue suppression so that NPEs show up in the IDE warnings.

fixes #466

Fixed potential NPE.
Removed DataFlowIssue suppression so that NPEs show up in the IDE warnings.
@traceyyoshima
Copy link
Contributor Author

Checking for ability to merge automatically… is frozen, pushed to main

/* Java trees */
if (updated instanceof J.Annotation) {
J.Annotation a = (J.Annotation) updated;
if (a.getAnnotationType() instanceof J.Identifier && a.getAnnotationType().getType() instanceof JavaType.Method) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to handle other types here as well? I am thinking what we would have in the case of a fully qualified type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

AnnotationMatcher doesn`t work in kotlin
2 participants