Skip to content

Improve AddressMatch CIDR naming compatibility#16315

Open
yin-bo-Final wants to merge 5 commits into
apache:3.3from
yin-bo-Final:fix-addressmatch-cidr-typo
Open

Improve AddressMatch CIDR naming compatibility#16315
yin-bo-Final wants to merge 5 commits into
apache:3.3from
yin-bo-Final:fix-addressmatch-cidr-typo

Conversation

@yin-bo-Final

Copy link
Copy Markdown
Contributor

What changed

This PR improves the CIDR naming in AddressMatch while keeping backward compatibility.

  • Added cidr field and getCidr / setCidr accessors.
  • Kept the existing cird field and getCird / setCird accessors as deprecated for compatibility.
  • Updated internal matching logic to use getCidr().
  • Added tests to cover both cidr and deprecated cird field mapping through PojoUtils.
  • Fixed the remaining cird typo in NetUtils Javadoc.

Motivation

cird appears to be a typo of cidr, where CIDR stands for Classless Inter-Domain Routing. Since the old name may already be used by configuration binding or external code, this PR keeps backward compatibility while introducing the correct naming.

Closes #16314

Tests

./mvnw -pl dubbo-cluster -Dtest=AddressMatchTest test

Add cidr accessors while keeping deprecated cird accessors for backward compatibility.

Add tests for cidr and cird field mapping through PojoUtils.

Refs apache#16314
@codecov-commenter

codecov-commenter commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.80%. Comparing base (d535eac) to head (14a3236).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16315      +/-   ##
============================================
+ Coverage     58.80%   60.80%   +2.00%     
- Complexity       15    11769   +11754     
============================================
  Files          1953     1953              
  Lines         89208    89213       +5     
  Branches      13458    13458              
============================================
+ Hits          52458    54246    +1788     
+ Misses        31073    29396    -1677     
+ Partials       5677     5571     -106     
Flag Coverage Δ
integration-tests-java21 32.11% <0.00%> (?)
integration-tests-java8 32.31% <0.00%> (?)
samples-tests-java21 32.17% <0.00%> (?)
samples-tests-java8 29.74% <0.00%> (?)
unit-tests-java11 59.06% <100.00%> (+0.01%) ⬆️
unit-tests-java17 58.52% <100.00%> (+<0.01%) ⬆️
unit-tests-java21 58.52% <100.00%> (+<0.01%) ⬆️
unit-tests-java25 58.48% <100.00%> (+0.05%) ⬆️
unit-tests-java8 59.07% <100.00%> (+0.02%) ⬆️

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

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

@zrlw zrlw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Improve AddressMatch CIDR field naming while keeping backward compatibility

3 participants