EgorBaranovEnjoysTyping commented on code in PR #13262:
URL: https://github.com/apache/ignite/pull/13262#discussion_r3481308946


##########
modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java:
##########
@@ -204,6 +205,106 @@ public void testToStringCheckObjectRecursionPrevention() 
throws Exception {
         fut4.get(3_000);
     }
 
+
+    /** */
+    @Test
+    public void testNPE() {
+        boolean success;
+        try {
+            SBLimitedLength sbLimitedLength = new SBLimitedLength(256);
+            sbLimitedLength.initLimit(new SBLengthLimit());
+            sbLimitedLength.a("a".repeat(7999));
+            sbLimitedLength.i(7000, "asd");
+            sbLimitedLength.a("a".repeat(10));
+            success = true;
+        } catch (NullPointerException ignored) {
+            success = false;
+        }
+        Assert.assertTrue(success);
+    }

Review Comment:
   We have Junit4, it has no assertThrows assertion, it's bypass



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to