Skip to content

Instantly share code, notes, and snippets.

@nathanchen
Created November 4, 2013 08:25
Show Gist options
  • Select an option

  • Save nathanchen/7299670 to your computer and use it in GitHub Desktop.

Select an option

Save nathanchen/7299670 to your computer and use it in GitHub Desktop.
equalsRegardingNull
private static boolean equalsRegardingNull(Object expected, Object actual) {
if (expected == null) {
return actual == null;
}
return isEquals(expected, actual);
}
private static boolean isEquals(Object expected, Object actual) {
return expected.equals(actual);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment