2 ms·
> Is this just acceptable now? No, but where before it was a hard requirement in Java to deal with NPEs, newer libs are less likely to return nulls, so it's us
by toyg 8y ago
> Is this just acceptable now?
No, but where before it was a hard requirement in Java to deal with NPEs, newer libs are less likely to return nulls, so it's usually a bit safer than it was. You also avoid leaving references around that could potentially leak.
There is also a bit of fashion with streams and JS-inspired call-chaining.