Skip to content

Use normalized key when building getMap error message in DefaultConfigProperties#8643

Draft
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:fix/config-properties-getmap-error-message
Draft

Use normalized key when building getMap error message in DefaultConfigProperties#8643
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:fix/config-properties-getmap-error-message

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Fixes #8642

Description

  • DefaultConfigProperties.getMap(String) printed Invalid map property: <name>=null when the name needed normalization (hyphens or upper case), because the error message looked the value up with config.get(name) while config keys are stored under ConfigUtil.normalizePropertyKey(name).
  • Change the message lookup to config.get(ConfigUtil.normalizePropertyKey(name)), matching the normalized-key lookup getList already uses (line 191).
  • Internal method body only: no signature, return value, or public API change.

Testing done

  • Added ConfigPropertiesTest#invalidMapWithHyphenatedName: a malformed map value under a hyphenated name (test-map = a=1,b) now reports Invalid map property: test-map=a=1,b; before the fix it reported test-map=null (verified failing before, passing after).
  • Existing invalidMap (name map) still passes — normalization is idempotent for already-normalized names.
  • ./gradlew :sdk-extensions:autoconfigure-spi:check — passed; ConfigPropertiesTest 17 tests passed. jApiCmp unchanged (internal method body only), no apidiff to commit.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 19, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-20 21:23:40 UTC.

  • Waiting on: Author
  • Next step: Move out of draft to request review.

This automated status or its linked feedback items may be incorrect. If something looks wrong, report it with the result you expected.

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.64%. Comparing base (09d6c17) to head (1cbf7bc).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8643   +/-   ##
=========================================
  Coverage     91.64%   91.64%           
  Complexity    10348    10348           
=========================================
  Files          1013     1013           
  Lines         27380    27380           
  Branches       3218     3218           
=========================================
  Hits          25092    25092           
  Misses         1558     1558           
  Partials        730      730           

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

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.

getMap error message shows null value for hyphenated or mixed-case property names

1 participant