github-code-scanning[bot] commented on code in PR #14772:
URL: https://github.com/apache/druid/pull/14772#discussion_r1286455775


##########
indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java:
##########
@@ -1392,7 +1736,7 @@
     @Override
     protected int getTaskGroupIdForPartition(String partition)
     {
-      return 0;
+      return Integer.parseInt(partition) % spec.getIoConfig().getTaskCount();

Review Comment:
   ## Missing catch of NumberFormatException
   
   Potential uncaught 'java.lang.NumberFormatException'.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5418)



##########
extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/KinesisDataSourceMetadataTest.java:
##########
@@ -233,4 +274,23 @@
   {
     return new KinesisDataSourceMetadata(new 
SeekableStreamEndSequenceNumbers<>("foo", sequences));
   }
+
+  private static ObjectMapper createObjectMapper()
+  {
+    DruidModule module = new KinesisIndexingServiceModule();
+    Injector injector = Initialization.makeInjectorWithModules(
+        GuiceInjectors.makeStartupInjector(),
+        Arrays.asList(
+            module,
+            (Module) binder -> {
+              
binder.bindConstant().annotatedWith(Names.named("serviceName")).to("test");
+              
binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8000);
+              
binder.bindConstant().annotatedWith(Names.named("tlsServicePort")).to(9000);
+            }
+        )
+    );

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [Initialization.makeInjectorWithModules](1) should be avoided 
because it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5417)



##########
extensions-core/kafka-indexing-service/src/test/java/org/apache/druid/indexing/kafka/KafkaDataSourceMetadataTest.java:
##########
@@ -170,4 +211,23 @@
   {
     return new KafkaDataSourceMetadata(new 
SeekableStreamEndSequenceNumbers<>("foo", offsets));
   }
+
+  private static ObjectMapper createObjectMapper()
+  {
+    DruidModule module = new KafkaIndexTaskModule();
+    Injector injector = Initialization.makeInjectorWithModules(
+        GuiceInjectors.makeStartupInjector(),
+        Arrays.asList(
+            module,
+            (Module) binder -> {
+              
binder.bindConstant().annotatedWith(Names.named("serviceName")).to("test");
+              
binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8000);
+              
binder.bindConstant().annotatedWith(Names.named("tlsServicePort")).to(9000);
+            }
+        )
+    );

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [Initialization.makeInjectorWithModules](1) should be avoided 
because it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5416)



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