Skip to content

Commit

Permalink
implementing kcooney's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
a committed May 10, 2012
1 parent 9237d8c commit 2b4ea7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/junit/framework/Assert.java
Expand Up @@ -226,8 +226,8 @@ static public void assertNotNull(String message, Object object) {
* Object to check or <code>null</code>
*/
static public void assertNull(Object object) {
String message= object != null ? "Expected: <null> but was: " + object.toString() : "";
assertNull(message, object);
if(object != null)
assertNull("Expected: <null> but was: " + object.toString(), object);
}
/**
* Asserts that an object is null. If it is not
Expand Down

0 comments on commit 2b4ea7d

Please sign in to comment.