3 ms·
That's another gotcha-- interning of strings and boxed primitives. Are there linters for this sort of thing? I don't write Java much any more.
by sedro 1y ago
That's another gotcha-- interning of strings and boxed primitives.
Are there linters for this sort of thing? I don't write Java much any more.
- dcminter 1y ago> Are there linters for this sort of thing? Yes and they're pretty good so it's rarely an issue in practice. Using == on object references will indeed usually get you yelled at by the linter.
- MBCook 1y agoI’ll say from experience that even if your IDE highlights that by default people won’t pay any attention to it and the bug will get in. I’ll be happy when it’s fixed.