We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d99ca4d commit e83e138Copy full SHA for e83e138
test/lib/jdk/test/lib/Asserts.java
@@ -201,10 +201,7 @@ public static void assertEquals(Object lhs, Object rhs) {
201
*/
202
public static void assertEquals(Object lhs, Object rhs, String msg) {
203
if ((lhs != rhs) && ((lhs == null) || !(lhs.equals(rhs)))) {
204
- msg = Objects.toString(msg, "assertEquals")
205
- + ": expected " + Objects.toString(lhs)
206
- + " to equal " + Objects.toString(rhs);
207
- fail(msg);
+ fail((msg == null ? "assertEquals" : msg) + " expected: " + lhs + " but was: " + rhs);
208
}
209
210
0 commit comments