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


##########
extensions-contrib/aliyun-oss-extensions/src/test/java/org/apache/druid/data/input/aliyun/OssInputSourceTest.java:
##########
@@ -538,20 +543,20 @@
     InputSourceReader reader = inputSource.reader(
         someSchema,
         new CsvInputFormat(ImmutableList.of("time", "dim1", "dim2"), "|", 
false, null, 0, null),
-        temporaryFolder.newFolder()
+        newFolder(temporaryFolder, "junit")
     );
 
     final InputStats inputStats = new InputStatsImpl();
     CloseableIterator<InputRow> iterator = reader.read(inputStats);
 
     while (iterator.hasNext()) {
       InputRow nextRow = iterator.next();
-      Assert.assertEquals(NOW, nextRow.getTimestamp());
-      Assert.assertEquals("hello", nextRow.getDimension("dim1").get(0));
-      Assert.assertEquals("world", nextRow.getDimension("dim2").get(0));
+      Assertions.assertEquals(NOW, nextRow.getTimestamp());
+      Assertions.assertEquals("hello", nextRow.getDimension("dim1").get(0));
+      Assertions.assertEquals("world", nextRow.getDimension("dim2").get(0));
     }
 
-    Assert.assertEquals(2 * CONTENT.length, inputStats.getProcessedBytes());
+    Assertions.assertEquals(2 * CONTENT.length, 
inputStats.getProcessedBytes());

Review Comment:
   Fixed in commit `c4361e8ffb` by widening the operand before multiplication 
(`2L * CONTENT.length`), preventing the int overflow identified by CodeQL. The 
focused Aliyun OSS compilation, Checkstyle, and test validation passed. 
Resolving this fixed finding.



##########
extensions-contrib/aliyun-oss-extensions/src/test/java/org/apache/druid/data/input/aliyun/OssInputSourceTest.java:
##########
@@ -585,20 +590,20 @@
     InputSourceReader reader = inputSource.reader(
         someSchema,
         new CsvInputFormat(ImmutableList.of("time", "dim1", "dim2"), "|", 
false, null, 0, null),
-        temporaryFolder.newFolder()
+        newFolder(temporaryFolder, "junit")
     );
 
     final InputStats inputStats = new InputStatsImpl();
     CloseableIterator<InputRow> iterator = reader.read(inputStats);
 
     while (iterator.hasNext()) {
       InputRow nextRow = iterator.next();
-      Assert.assertEquals(NOW, nextRow.getTimestamp());
-      Assert.assertEquals("hello", nextRow.getDimension("dim1").get(0));
-      Assert.assertEquals("world", nextRow.getDimension("dim2").get(0));
+      Assertions.assertEquals(NOW, nextRow.getTimestamp());
+      Assertions.assertEquals("hello", nextRow.getDimension("dim1").get(0));
+      Assertions.assertEquals("world", nextRow.getDimension("dim2").get(0));
     }
 
-    Assert.assertEquals(2 * CONTENT.length, inputStats.getProcessedBytes());
+    Assertions.assertEquals(2 * CONTENT.length, 
inputStats.getProcessedBytes());

Review Comment:
   Fixed in commit `c4361e8ffb` by widening the operand before multiplication 
(`2L * CONTENT.length`), preventing the int overflow identified by CodeQL. The 
focused Aliyun OSS compilation, Checkstyle, and test validation passed. 
Resolving this fixed finding.



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