From 86b979e11a20915c932ba56809a0fb5ef10ade67 Mon Sep 17 00:00:00 2001 From: Kurt Alfred Kluever Date: Mon, 14 Nov 2022 10:15:36 -0500 Subject: [PATCH] Update AssertTest.java Use `assertNotNull()` instead. --- src/test/java/junit/tests/framework/AssertTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/junit/tests/framework/AssertTest.java b/src/test/java/junit/tests/framework/AssertTest.java index 42731bb5207e..d971a1ef8426 100644 --- a/src/test/java/junit/tests/framework/AssertTest.java +++ b/src/test/java/junit/tests/framework/AssertTest.java @@ -82,7 +82,7 @@ public void testAssertStringNotEqualsNull() { assertEquals("foo", null); fail(); } catch (ComparisonFailure e) { - String unused = e.getMessage(); // why no assertion? + assertNotNull(e.getMessage()); } } @@ -90,7 +90,7 @@ public void testAssertNullNotEqualsNull() { try { assertEquals(null, new Object()); } catch (AssertionFailedError e) { - String unused = e.getMessage(); // why no assertion? + assertNotNull(e.getMessage()); return; } fail();