Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 388 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 388 Bytes

Refactoring Early Returns

Build Status

2 Practice Exercises for Refactoring Early Returns in Java.

Steps for refactoring

  1. Add nullable return
    1. set value
    2. if != null return
    3. move if
    4. add else
    5. invert if
    6. repeat until all returns are at the end
  2. clean up