Once, after we had an application go live, we started getting reports after a few hours that new users were unable to log in.
It turns out, somewhere in the auth path, a dev had used `==` to verify a user's ID, which worked for Longs under (I believe) 128, so any users with an ID bigger than that were unable to log in due to the comparison failing.
Return false! They aren't equal. But of course we're comparing a reference to a primitive, so we either lift the primitive to a reference, or lower the reference... so here we are.
dcminter|4 months ago
prein|4 months ago
It turns out, somewhere in the auth path, a dev had used `==` to verify a user's ID, which worked for Longs under (I believe) 128, so any users with an ID bigger than that were unable to log in due to the comparison failing.
kittko|4 months ago
sedro|4 months ago
Are there linters for this sort of thing? I don't write Java much any more.
hashmash|4 months ago
metaltyphoon|4 months ago
unknown|4 months ago
[deleted]
commandersaki|4 months ago
blandflakes|4 months ago
mrkeen|4 months ago
thiht|4 months ago