groovy / groovy/groovy-eclipse
Rename of class with constructor using default arguments causes error
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 681
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following:
class DefaultParams {
String value
DefaultParams(String value = '') {
this.value = value
}
/*@Generated
DefaultParams() {
this((String)'')
}*/
}
Rename "DefaultParams" to anything else and there is a refactoring error due to overlapping edits for generated constructors. The generated constructor(s) for default arguments share the name range of the original for searching purposes.
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
Start with the Groovy class in the issue body and reproduce the rename refactoring with its default-argument constructor. Trace how generated constructors are included in rename edits; done means renaming the class no longer fails with overlapping edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100