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


##########
processing/src/main/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutors.java:
##########
@@ -47,14 +47,18 @@
         exec,
         initialDelay,
         delay,
-        new Callable<Signal>()
+        new Callable<>()
         {
           @Override
           public Signal call()
           {
             runnable.run(); // (Exceptions are handled for us)
             if (exec.isShutdown()) {
-              log.warn("ScheduledExecutorService is ShutDown. Return 
'Signal.STOP' and stopped rescheduling %s (delay %s)", this, delay);
+              log.warn(
+                  "ScheduledExecutorService is ShutDown. Return 'Signal.STOP' 
and stopped rescheduling %s (delay %s)",
+                  this,

Review Comment:
   ## Use of default toString()
   
   Default toString():  inherits toString() from Object, and so is not suitable 
for printing.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/8531)



##########
indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java:
##########
@@ -2908,7 +2908,7 @@
     @Override
     protected OrderedSequenceNumber<String> makeSequenceNumber(String seq, 
boolean isExclusive)
     {
-      return new OrderedSequenceNumber<String>(seq, isExclusive)
+      return new OrderedSequenceNumber<>(seq, isExclusive)

Review Comment:
   ## Inconsistent compareTo
   
   This class declares [compareTo](1) but inherits equals; the two could be 
inconsistent.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/8534)



##########
indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/SeekableStreamSupervisorSpecTest.java:
##########
@@ -247,7 +247,7 @@
     @Override
     protected OrderedSequenceNumber<String> makeSequenceNumber(String seq, 
boolean isExclusive)
     {
-      return new OrderedSequenceNumber<String>(seq, isExclusive)
+      return new OrderedSequenceNumber<>(seq, isExclusive)

Review Comment:
   ## Inconsistent compareTo
   
   This class declares [compareTo](1) but inherits equals; the two could be 
inconsistent.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/8533)



##########
processing/src/test/java/org/apache/druid/java/util/common/guava/ConcatSequenceTest.java:
##########
@@ -207,21 +207,21 @@
                     ImmutableList.of(4, 5, 6)
                 )
             ),
-            new Function<ImmutableList<Integer>, Sequence<Integer>>()
+            new Function<>()
             {
               @Override
               public Sequence<Integer> apply(final ImmutableList<Integer> 
input)
               {
                 if (lastSeqFullyRead.getAndSet(false)) {
                   return Sequences.simple(
-                      new Iterable<Integer>()
+                      new Iterable<>()

Review Comment:
   ## Iterable wrapping an iterator
   
   This class implements Iterable, but does not appear to support multiple 
iterations, since its iterator method always returns an iterator based on the 
same [iterator](1).
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/8532)



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