Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@LI123456mo
Copy link
Contributor

This PR adds unit test coverage for the Utf8Utils utility class.

Changes:

Added Utf8UtilsTest.java to verify UTF-8 decoding logic.

Added test cases for:

Basic ASCII strings (1-byte).

Multi-byte characters (Chinese characters).

Error handling for invalid UTF-8 sequences.

Edge cases like empty input.

Verification: All tests passed locally using mvn clean test -Dtest=Utf8UtilsTest -pl dubbo-common.

@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.75%. Comparing base (a92d5d0) to head (b158ae1).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16029      +/-   ##
============================================
- Coverage     60.75%   60.75%   -0.01%     
+ Complexity    11736    11734       -2     
============================================
  Files          1949     1949              
  Lines         88801    88801              
  Branches      13391    13391              
============================================
- Hits          53952    53951       -1     
+ Misses        29314    29307       -7     
- Partials       5535     5543       +8     
Flag Coverage Δ
integration-tests-java21 32.22% <ø> (+<0.01%) ⬆️
integration-tests-java8 32.30% <ø> (-0.06%) ⬇️
samples-tests-java21 32.17% <ø> (+0.05%) ⬆️
samples-tests-java8 29.83% <ø> (+0.11%) ⬆️
unit-tests-java11 59.01% <ø> (-0.04%) ⬇️
unit-tests-java17 58.51% <ø> (+<0.01%) ⬆️
unit-tests-java21 58.52% <ø> (+<0.01%) ⬆️
unit-tests-java25 58.48% <ø> (ø)
unit-tests-java8 59.04% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants