Chapter 9. Refactoring, testing, and debugging

This chapter covers

  • Refactoring code to use lambda expressions
  • Appreciating the impact of lambda expressions on object-oriented design patterns
  • Testing lambda expressions
  • Debugging code that uses lambda expressions and the Streams API

In the first eight chapters of this book, you saw the expressive power of lambdas and the Streams API. You were mainly creating new code that used these features. If you have to start a new Java project, you can use lambdas and streams immediately.

Unfortunately, you don’t always get to start a new project from scratch. Most of the time you have to deal with an existing code base written in an older version of Java.

This chapter presents several recipes that show ...

Get Modern Java in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.