3 ms·
Useful, yet Paranoid Java Programming Techniques
- sorokod 8y ago"It’s just never a bad idea to prevent the occasional NullPointerException by putting the String literal on the left side of an equals() comparison" In general I'd rather fail early and hard with a line number in the stack trace indicating where exactly things went wrong.