FrankChen021 opened a new pull request, #19823:
URL: https://github.com/apache/druid/pull/19823

   ## What
   
   - make nullable control flow explicit before dereferences
   - replace unnecessary boxed locals with primitives
   - correctly preserve numeric nulls in `subtract_months`
   - retain deliberate string-reference identity fast paths with narrow CodeQL 
annotations
   
   ## Why
   
   This addresses all 43 CodeQL warnings in the nullness/type group:
   
   - 20 `java/dereferenced-value-may-be-null`
   - 19 `java/non-null-boxed-variable`
   - 4 `java/reference-equality-on-strings`
   
   ## Impact
   
   The changes prevent possible null dereferences, make test assumptions fail 
clearly, avoid unnecessary boxing, and fix numeric-null propagation in 
`subtract_months`. The string identity comparisons remain behavior-preserving 
performance fast paths.
   
   ## Root cause
   
   Several code paths relied on invariants that were not expressed to the type 
system, while `subtract_months` boxed primitive values and then performed 
ineffective null checks.
   
   ## Checks
   
   - affected-module compilation and Checkstyle passed
   - production nullness tests: 182 passed
   - boxed-variable tests: 135 passed
   - test-nullness and comparator tests: 349 passed
   - `git diff --check`
   
   Created by GPT-5.6-Sol.
   


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