Skip to content

Latest commit

 

History

History
19 lines (17 loc) · 452 Bytes

File metadata and controls

19 lines (17 loc) · 452 Bytes

Rename field

Why?

  • You have a reference object that’s too small and will not be changed.

Benefits:

  • The name is clear and the code is more readable and understandable.

What?

  • Change reference to value

How?

  • Check that the candidate class is immutable or can become immutable
  • For each setter apply "Remove Setting" Method

Sample

Before

After refactoring