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 3607554 commit 27c553eCopy full SHA for 27c553e
test/lib/jdk/test/lib/Asserts.java
@@ -199,10 +199,7 @@ public static void assertEquals(Object lhs, Object rhs) {
199
*/
200
public static void assertEquals(Object lhs, Object rhs, String msg) {
201
if ((lhs != rhs) && ((lhs == null) || !(lhs.equals(rhs)))) {
202
- msg = Objects.toString(msg, "assertEquals")
203
- + ": expected " + Objects.toString(lhs)
204
- + " to equal " + Objects.toString(rhs);
205
- fail(msg);
+ fail((msg == null ? "assertEquals" : msg) + " expected: " + lhs + " but was: " + rhs);
206
}
207
208
0 commit comments