Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Return a meaningful error when null on a primitive #92
Migrated from: CodeHaus issue EASYMOCK-81
Currently if you accidentally write something like expect(a.foo()).andReturn(null); // foo is typed to return a boolean
you run into a seemingly surprising error message where a NullPointerException is thrown when the method is called, later, despite nothing looking like it's null.
This causes some confusion and frustration.