Skip to content

Small changes - #8276

Closed
mernst wants to merge 2 commits into
typetools:masterfrom
mernst:relevance-ancillary
Closed

mernst wants to merge 2 commits into
typetools:masterfrom
mernst:relevance-ancillary

Conversation

@mernst

@mernst mernst commented Sep 23, 2026

Copy link
Copy Markdown
Member

Four changes to JavaParserUtil that were made while working on #8208, but that are independent of it:

  • Move the test for a local type declaration in resolveTypeName above the test for a type parameter, to group the two shadowing tests that return null, and say that a local class shadows a type parameter of the same name. Neither a BlockStmt nor a SwitchEntry is a NodeWithTypeParameters, so no iteration of the loop can take both branches and the order does not affect the result.
  • Say why resolveTypeName searches every member type that the enclosing type declares, whatever its access modifier is.
  • Document that typeToTypeMirror returns null for a use of a type variable, which it already did.
  • Replace the private resolveTypeName overload's vague "reads and writes a cache, for efficiency" by what that cache does.

Four changes to `JavaParserUtil` that were made while working on typetools#8208, but
that are independent of it:

* Move the test for a local type declaration in `resolveTypeName` above the
  test for a type parameter, to group the two shadowing tests that return
  null, and say that a local class shadows a type parameter of the same
  name.  Neither a `BlockStmt` nor a `SwitchEntry` is a
  `NodeWithTypeParameters`, so no iteration of the loop can take both
  branches and the order does not affect the result.
* Say why `resolveTypeName` searches every member type that the enclosing
  type declares, whatever its access modifier is.
* Document that `typeToTypeMirror` returns null for a use of a type
  variable, which it already did.
* Replace the private `resolveTypeName` overload's vague "reads and writes a
  cache, for efficiency" by what that cache does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: typetools/checker-framework/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 2b5540c9-b1af-4bb4-8642-4434727009b6

📥 Commits

Reviewing files that changed from the base of the PR and between e515f3c and 7ba6af1.

📒 Files selected for processing (1)
  • framework/src/main/java/org/checkerframework/framework/util/JavaParserUtil.java

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mernst mernst closed this Sep 23, 2026
@mernst
mernst deleted the relevance-ancillary branch September 23, 2026 17:16
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.

1 participant