FrankChen021 commented on code in PR #19940:
URL: https://github.com/apache/druid/pull/19940#discussion_r3743049245


##########
processing/src/test/java/org/apache/druid/java/util/common/StringUtilsTest.java:
##########
@@ -150,165 +145,171 @@
       final ByteBuffer bytes = bufferHolder.get();
       bytes.put(new byte[]{'a', 'b', 'c', 'd'});
       bytes.rewind();
-      Assert.assertEquals("abcd", StringUtils.fromUtf8(bytes, 4));
+      Assertions.assertEquals("abcd", StringUtils.fromUtf8(bytes, 4));
       bytes.rewind();
-      Assert.assertEquals("abcd", StringUtils.fromUtf8(bytes));
+      Assertions.assertEquals("abcd", StringUtils.fromUtf8(bytes));
     }
   }
 
   @SuppressWarnings("MalformedFormatString")
   @Test
   public void testNonStrictFormat()
   {
-    Assert.assertEquals("test%d; format", 
StringUtils.nonStrictFormat("test%d", "format"));
-    Assert.assertEquals("test%s%s; format", 
StringUtils.nonStrictFormat("test%s%s", "format"));
+    Assertions.assertEquals("test%d; format", 
StringUtils.nonStrictFormat("test%d", "format"));
+    Assertions.assertEquals(
+        "test%s%s; format",
+        // codeql[java/missing-format-argument]
+        StringUtils.nonStrictFormat("test%s%s", "format")

Review Comment:
   Evaluated and intentionally left unchanged: this is a valid CodeQL pattern 
match but an expected test-only case for StringUtils.nonStrictFormat fallback 
behavior. The alert was dismissed as used in tests; no source behavior change 
is needed. The focused StringUtilsTest and processing validation passed.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to