typetools / typetools/checker-framework

Clean up logic to determine whether an annotation is a type annotation

Open
#2,538 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

#2298 added checks to ensure annotations and modifiers are ordered properly.
This duplicated some logic in BaseTypeVisitor.isTypeAnnotation that would be more properly put into AnnotatedTypes, which already containes an isTypeAnnotation method.
#2376 started work on this clean up, but is running into problems.
Solving this issue would reduce duplication and move logic to a consistent place.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing BaseTypeVisitor.isTypeAnnotation with the existing AnnotatedTypes.isTypeAnnotation method. Read the changes and problems described in #2298 and #2376 before tracing how annotation and modifier ordering checks use this logic. Done means the duplicated logic is centralized in AnnotatedTypes and ordering checks continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.