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


##########
server/src/test/java/org/apache/druid/test/utils/ImmutableDruidDataSourceTestUtils.java:
##########
@@ -68,8 +68,8 @@
       return actual == null;
     }
 
-    Assert.assertEquals("expected and actual ImmutableDruidDataSource lists 
should be of equal size",
-        expected.size(), actual.size());
+    Assertions.assertEquals(expected.size(), actual.size(),

Review Comment:
   Investigated CodeQL alert 11878. This is pre-existing, not introduced by 
PR6: offical/master at 5cad7d306c and the PR parent already contain the same 
actual.size() dereference after the existing expected == null guard. The PR6 
diff only replaces org.junit.Assert with org.junit.jupiter.api.Assertions and 
moves the assertion message to the JUnit 5 argument position; it does not 
change null handling or evaluation order. With expected non-null and actual 
null, both versions dereference actual.size() before the assertion. No code 
change is warranted in this JUnit migration; the finding can be handled 
separately if desired. Validation passed: server test-compile, 
DataSourcesResourceTest#testGetFullQueryableDataSources (1 test), Checkstyle (0 
violations), SpotBugs (0 errors), and git diff --check.



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