by vishnugupta · 12y ago · 0 comments
StringUtils.equals(a, b) on the other hand clearly states in its interface document that it is null safe and there's no NPE trap.
There, I said it :). That was my lengthy argument for using StringUtils.equals!
Code reviews should focus on more important things than this, IMO.
Making code that shouldn't need to be "null safe" masks errors, and ultimately makes them harder to track down.