Skip to content

Instantly share code, notes, and snippets.

@maggandalf
Created April 8, 2011 17:35
Show Gist options
  • Save maggandalf/910329 to your computer and use it in GitHub Desktop.
Save maggandalf/910329 to your computer and use it in GitHub Desktop.
Equals that throws a Null Pointer Exception
public void showFoo(Foo foo) { Foo foo2 = new Foo();
//lot of code
if(foo.equals(foo2)) {
System.out.println("Two Men");
} else {
System.out.println("And a Half");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment