Skip to content

Use NumberFormatException in baggage decoder#8593

Draft
ADITYA-CODE-SOURCE wants to merge 1 commit into
open-telemetry:mainfrom
ADITYA-CODE-SOURCE:issue-8556-baggage-number-format
Draft

Use NumberFormatException in baggage decoder#8593
ADITYA-CODE-SOURCE wants to merge 1 commit into
open-telemetry:mainfrom
ADITYA-CODE-SOURCE:issue-8556-baggage-number-format

Conversation

@ADITYA-CODE-SOURCE

Copy link
Copy Markdown
Contributor

Summary

  • replace the invalid hex-digit exception in BaggageCodec.digit16(byte) with NumberFormatException
  • include byte and character details in the error message
  • add a focused regression test for invalid hex input

Fixes #8556

Testing

  • ./gradlew :api:all:test --tests "*BaggageCodecTest" --tests "*W3CBaggagePropagatorTest"
  • ./gradlew :api:all:spotlessCheck

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.

Replace IllegalArgumentException with NumberFormatException to improve error message formatting

1 participant