Skip to content

Comments

fix: toCommaDelimitedString returns "null,null" when inputs are null#15322

Closed
ankitshokeen wants to merge 17 commits intoapache:3.3from
ankitshokeen:fix/commaDelimited-null-handling
Closed

fix: toCommaDelimitedString returns "null,null" when inputs are null#15322
ankitshokeen wants to merge 17 commits intoapache:3.3from
ankitshokeen:fix/commaDelimited-null-handling

Conversation

@ankitshokeen
Copy link
Contributor

@ankitshokeen ankitshokeen commented Apr 15, 2025

Issue

#15321

What is the purpose of the change?

This change corrects the behavior of StringUtils.toCommaDelimitedString(String one, String... others) to return null when either argument is null, as described in its Javadoc. Previously, the method would return a string like "null,null", which could lead to misleading outputs and test failures. This update ensures consistency between the method's implementation and its documented contract.

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2025

Codecov Report

❌ Patch coverage is 68.53933% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.61%. Comparing base (7b34ad9) to head (328d945).
⚠️ Report is 148 commits behind head on 3.3.

⚠️ Current head 328d945 differs from pull request most recent head 0a2d0e3

Please upload reports for the commit 0a2d0e3 to get more accurate results.

Files with missing lines Patch % Lines
...stry/client/ServiceDiscoveryRegistryDirectory.java 70.21% 10 Missing and 4 partials ⚠️
...moting/transport/netty4/NettyConnectionClient.java 40.00% 8 Missing and 1 partial ⚠️
.../dubbo/registry/integration/RegistryDirectory.java 88.00% 1 Missing and 2 partials ⚠️
...ava/org/apache/dubbo/common/utils/StringUtils.java 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (7b34ad9) and HEAD (328d945). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (7b34ad9) HEAD (328d945)
unit-tests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##                3.3   #15322       +/-   ##
=============================================
- Coverage     60.76%   35.61%   -25.15%     
+ Complexity    10918    10882       -36     
=============================================
  Files          1886     1886               
  Lines         86127    86163       +36     
  Branches      12903    12909        +6     
=============================================
- Hits          52334    30688    -21646     
- Misses        28332    51004    +22672     
+ Partials       5461     4471      -990     
Flag Coverage Δ
integration-tests 32.97% <67.41%> (-0.23%) ⬇️
samples-tests 29.40% <68.53%> (+0.06%) ⬆️
unit-tests ?

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.

@ankitshokeen
Copy link
Contributor Author

@AlbumenJ @songxiaosheng @JunJieLiu51520 please review this PR

@oxsean
Copy link
Contributor

oxsean commented Apr 24, 2025

Why are there so many unrelated changes?

B
Remove unwanted files from branch
@ankitshokeen
Copy link
Contributor Author

Why are there so many unrelated changes?

Invalid PR, please ignore
working on another.

@ankitshokeen
Copy link
Contributor Author

Why are there so many unrelated changes?

@oxsean please check #15338

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.

4 participants