Skip to content

Instantly share code, notes, and snippets.

@nhajratw
Created August 30, 2012 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhajratw/3527731 to your computer and use it in GitHub Desktop.
Save nhajratw/3527731 to your computer and use it in GitHub Desktop.
Do not write code like this
if (!(this == null && rhs == null || code == null && rhs.code == null) &&
(this == null && rhs != null ||
this != null && rhs == null ||
code != null && rhs.code == null ||
code == null && rhs.code != null ||
!code.equals(rhs.code))) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment