github-advanced-security[bot] commented on code in PR #19881:
URL: https://github.com/apache/druid/pull/19881#discussion_r3715062034


##########
extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchSetOpPostAggregatorTest.java:
##########
@@ -38,32 +38,31 @@
 import org.apache.druid.segment.column.ColumnType;
 import org.apache.druid.segment.column.RowSignature;
 import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.Arrays;
 import java.util.Comparator;
 import java.util.Map;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 public class ArrayOfDoublesSketchSetOpPostAggregatorTest
 {
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
 
   @Test
   public void testConstructorNumArgs()
   {
-    expectedException.expect(IAE.class);
-    expectedException.expectMessage("Illegal number of fields[0], must be > 
1");
-    final PostAggregator there = new ArrayOfDoublesSketchSetOpPostAggregator(
-        "a",
-        "UNION",
-        null,
-        null,
-        ImmutableList.of()
-    );
+    Throwable exception = Assertions.assertThrows(IAE.class, () -> {
+      final PostAggregator there = new ArrayOfDoublesSketchSetOpPostAggregator(
+          "a",
+          "UNION",
+          null,
+          null,
+          ImmutableList.of()
+      );

Review Comment:
   ## CodeQL / Unread local variable
   
   Variable 'PostAggregator there' is never read.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/11560)



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