2 ms·
> You should never have concrete expectations or make assertions on an unknown As long as Optional#isPresent exists, you can have "concrete expectations" of an
by masklinn 11y ago
> You should never have concrete expectations or make assertions on an unknown
As long as Optional#isPresent exists, you can have "concrete expectations" of an optional's content (or lack thereof).
> At that point a harmless looking refactor by someone else can introduce NPEs.
The fundamental problem is not .get, it's that you're qualifying code changes involving partial function as "harmless-looking" and "refactoring"