2 ms·
I had a fun one with this once. It looked something like this, using your `user.getId` method: int userId = p ? 0 : user.getId(); We spent a few hours sta
by jdmichal 11y ago
I had a fun one with this once. It looked something like this, using your `user.getId` method:
int userId = p ? 0 : user.getId();
We spent a few hours staring at this trying to figure out why there was a `NullPointerException` on a line dealing with `int` values. Eventually realized that `thing` was really an `Integer`, causing the entire trinary to be an `Integer`, which was then being unboxed to an `int`.