CVS: junit/src/org/junit Assert.java,1.5,1.6

David Saff <[email protected]> Thu, 26 Apr 2007 12:56:33 -0700
Newsgroups gmane.comp.java.junit.devel
Message-ID <[email protected]>
Update of /cvsroot/junit/junit/src/org/junit
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1805/src/org/junit

Modified Files:
	Assert.java 
Log Message:
[Junit-trackers] [ junit-Bugs-1684562 ] assertEquals throws NPE while comparing null elements 
Descriptions now have Annotations

Index: Assert.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/Assert.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Assert.java	8 Feb 2007 22:45:21 -0000	1.5
+++ Assert.java	26 Apr 2007 19:56:30 -0000	1.6
@@ -455,8 +455,8 @@
 		String formatted= "";
 		if (message != null && ! message.equals(""))
 			formatted= message + " ";
-		String expectedString= expected.toString();
-		String actualString= actual.toString();
+		String expectedString= String.valueOf(expected);
+		String actualString= String.valueOf(actual);
 		if (expectedString.equals(actualString))
 			return formatted + "expected: " + expected.getClass().getName() + "<" + expectedString + "> but was: " + actual.getClass().getName() + "<" + actualString + ">";
 		else


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/