sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Refactoring rename support for SpEL literals that references other code

Open MahatmaFatalError opened this issue 5 years ago • 0 comments

Follow up of https://github.com/spring-projects/sts4/issues/475

Considering this situation:

@CacheEvict(key = "#customer.customerId")
public void insert(Customer customer) {
	//some logic
}

Then assume to refactor rename the field customerId of the Customer class to e.g. just id. Since the cache key String literal is not considered by the refactoring action it is hard to notice that the @CacheEvict does not work anymore as expected.

Similarly, renaming a method parameter does not take the String literal into account grafik

So it would be great if the refactor rename action also considers SpEL literals.

MahatmaFatalError avatar Aug 10 '20 07:08 MahatmaFatalError