I guess I was missing the NPE: https://ideone.com/rp4Nvv
Optional.of(null) throws an NPE
Also known as "Make the change easy, then make the change"
Something to realize is that every codebase is legacy. My best new feature implementations are always several commits that do no-op refactorings, with no changes to tests even with good coverage (or adding tests before the refactoring for better coverage), then one short and sweet commit with just the behavior change.
Isn't that the classic argument "Real C programmers don't write defaults!" ?
The one that companies have spent billions of dollars fixing, including creating new restrictive languages?
I mean, I get the point of tests, but if your language obviates the need for some tests, it's a win for everyone. And as for the "how much code will I need to change to propagate this null?", the type system will tell you all the places where it might have an impact; once it compiles again, you can be fairly sure that you handled it in every place.