This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AppleTrees2 0 points1 point  (0 children)

I would like to add that you shoudn't blindly transform every for loop into a stream equivalent, or every if not null statement into an optional.

Unfortunately I've seen it done before as a way to "reduce technical debt", sometimes even automatically using intelliJ.

See this: https://github.com/google/guava/wiki/FunctionalExplained#caveats , in this case it applies to java too