groovy / groovy/groovy-eclipse
Rename of static accessor method fails to rename property-style access w/o object expression
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 681
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following:
package a
class B {
static def getX() {}
}
import static a.B.getX
x
x is a static method call expression for getX. Renaming getX in B properly renames the static import reference, but fails to rename the static method call expression.
Note: This happens because the static import is renamed in the first phase of the rename refactoring. Then the rename participant is called to find property-style accesses. At that time, type inferencing cannot establish the connection between the expression x and the static import, which now refers to the new name for the accessor.
See #678 for more details
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the rename refactoring with the Groovy classes and static import shown in the issue, then trace the static import rename and the later property-style access lookup. Use #678 for related context. Done means renaming getX also updates the property-style x call without breaking the static import reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100