Java 8 Refactoring Part 2: Stream Wrecks

JAVING
1 min readJun 16, 2020

A stream wreck is a complex concatenation of streams that tries to provide some results in a one-liner. One-liners are good but concatenation of Streams is not good since makes the code quite difficult to follow. To fix stream wrecks we need to extract methods, local variables or classes in order to be able to improve the readability of the code.

Originally posted at: http://javing.blogspot.com/2018/12/java-8-refactoring-part-2-stream-wrecks.html

--

--

JAVING

The present continuous form of “to program in Java”.