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


##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/HashPartitionTaskKillTest.java:
##########
@@ -329,16 +329,19 @@
       // will break requiring messing with the logic below).
       // For the other two subsequent failures we need to have numShards 
non-null, so it bypasses
       // the first failure, so the conditions for failure in the different 
phase are given below:
+      final HashedPartitionsSpec partitionsSpec
+          = (HashedPartitionsSpec) 
getIngestionSchema().getTuningConfig().getPartitionsSpec();
+
       ParallelIndexTaskRunner<T, R> retVal;
       if (succeedsBeforeFailing == 0
-          && this.getIngestionSchema().getTuningConfig().getNumShards() == 
null) {
+          && partitionsSpec == null || partitionsSpec.getNumShards() == null) {

Review Comment:
   ## Dereferenced variable may be null
   
   Variable [partitionsSpec](1) may be null at this access as suggested by 
[this](2) null guard.
   Variable [partitionsSpec](1) may be null at this access as suggested by 
[this](3) null guard.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/7625)



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