Skip to content

Fix potential NPE for switch statement when null case is missing#20044

Merged
gaobinlong merged 3 commits into
opensearch-project:mainfrom
gaobinlong:fix_NPE
Nov 21, 2025
Merged

Fix potential NPE for switch statement when null case is missing#20044
gaobinlong merged 3 commits into
opensearch-project:mainfrom
gaobinlong:fix_NPE

Add more unit tests

1293555
Select commit
Loading
Failed to load commit list.
Codecov / codecov/project succeeded Nov 20, 2025 in 0s

73.36% (target 70.00%)

View this Pull Request on Codecov

73.36% (target 70.00%)

Details

Codecov Report

❌ Patch coverage is 80.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.36%. Comparing base (acdae04) to head (1293555).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...g/opensearch/common/inject/internal/MoreTypes.java 82.35% 2 Missing and 1 partial ⚠️
.../java/org/opensearch/painless/ir/ConstantNode.java 0.00% 1 Missing ⚠️
.../org/opensearch/common/inject/internal/Errors.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20044      +/-   ##
============================================
+ Coverage     73.27%   73.36%   +0.09%     
- Complexity    71541    71641     +100     
============================================
  Files          5789     5789              
  Lines        327153   327160       +7     
  Branches      47157    47154       -3     
============================================
+ Hits         239729   240032     +303     
+ Misses        68185    67903     -282     
+ Partials      19239    19225      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.