Community
Participate
Working Groups
Enhancement request. Java language refactor wizard should when refactoring standard object setters also update the argument name PROVIDING it follows standard java argument conventions otherwise it should leave as-is. Before refactor: public void setMyStringVar(String myStringVar) { this.myStringVar = myStringVar; } After refactor: public void setYourStringVar(String myStringVar) { this.yourStringVar = myStringVar; } Notice the argument name is still "myStringVar". The code change is simply a cosmetic change to reduce the change of confusing the developer at a later date due to thinking this code has never been audited/reviewed. To test: 1) Create new Class of any name. 2) Create member variable "private String myStringVar;" 3) Create using wizzard standard getters and setters for this member variable. 4) Now highlight variable declaration. 5) Select refactor. 6) Change name to yourStringVar" 7) Tick all the boxes to update getters and setters too. 8) Now look at the change getters and setters code it will look like this:
Markus, we discussed adding updating derived names for type renamed. Doing it for setter and getter makes sense as well.
*** This bug has been marked as a duplicate of 64698 ***