openrewrite / openrewrite/rewrite-analysis
Inner JavaVisitor in `findAllValues` to track multiple subtrees on left side of assignment
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 16
- Forks
- 12
- Avg merge
- 2h 26m
- Merged PRs (30d)
- 1
Description
As of right now, findAllValues in VarAccess can traverse one layer on the subtree of a VarAccess to track value assignments on a variable like this.i. However, suppose we have the following case (where this.self == this and there exists a method called getSelf that returns self):
this.self.getSelf().self = this;
We would ultimately want to track values for this type of VarAccess with the inner JavaVisitor.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating VarAccess.findAllValues and reading how its current JavaVisitor traverses a VarAccess subtree. Trace the example this.self.getSelf().self = this and define done as tracking assignments across multiple left-side subtrees with the inner JavaVisitor, including the stated getSelf case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100