Skip to content

To Handle non string keys in CaseInsensitiveMap'get - #9003

Open
NithinU2802 wants to merge 1 commit into
open-telemetry:mainfrom
NithinU2802:fix/case-insensitive-map-invalid-key
Open

NithinU2802 wants to merge 1 commit into
open-telemetry:mainfrom
NithinU2802:fix/case-insensitive-map-invalid-key

Conversation

@NithinU2802

Copy link
Copy Markdown
Contributor

This PR is to handle non string keys in CaseInsensitiveMap'get, currently CaseInsensitiveMap.get(Object) lowercases keys by casting them to String. As a result, looking up a null or non-string key could throw exceptions instead of returning null, as expected from a map lookup.

Return null for keys that aren’t strings, while preserving case insensitive lookup for string keys, also added tests for null and non-string keys.

@NithinU2802
NithinU2802 requested a review from a team as a code owner November 3, 2026 13:23
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-11-03 13:54 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.38%. Comparing base (69c38ee) to head (5438f95).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9003      +/-   ##
============================================
- Coverage     90.39%   90.38%   -0.01%     
+ Complexity    10997    10996       -1     
============================================
  Files          1020     1020              
  Lines         30096    30098       +2     
  Branches       3929     3929              
============================================
- Hits          27204    27203       -1     
  Misses         1937     1937              
- Partials        955      958       +3     

☔ View full report in Codecov by Harness.
📢 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant