Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Descriptions
While working on PR #16309, I noticed that AddressMatch uses cird as the field and accessor method name:
private String cird;
public String getCird() {
return cird;
}
public void setCird(String cird) {
this.cird = cird;
}
Based on the address matching logic, this field is used for CIDR/IP expression matching. It seems that cird may be a typo of cidr, since the correct networking term is CIDR, which stands for Classless Inter-Domain Routing.
Since getCird / setCird may already be used by configuration binding, serialization, or external code, directly renaming them may introduce compatibility risks.
I would like to propose adding backward-compatible cidr accessors while keeping the existing cird accessors.
private String cidr;
public String getCidr() {
return cidr;
}
public void setCidr(String cidr) {
this.cidr = cidr;
}
/**
* @deprecated use {@link #getCidr()} instead.
*/
@Deprecated
public String getCird() {
return cidr;
}
/**
* @deprecated use {@link #setCidr(String)} instead.
*/
@Deprecated
public void setCird(String cird) {
this.cidr = cird;
}
This keeps backward compatibility while making the intended CIDR naming clearer for future usage.
Related issues
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Descriptions
While working on PR #16309, I noticed that
AddressMatchusescirdas the field and accessor method name:Based on the address matching logic, this field is used for
CIDR/IPexpression matching. It seems thatcirdmay be a typo ofcidr, since the correct networking term isCIDR, which stands for Classless Inter-Domain Routing.Since
getCird/setCirdmay already be used by configuration binding, serialization, or external code, directly renaming them may introduce compatibility risks.I would like to propose adding backward-compatible
cidraccessors while keeping the existingcirdaccessors.This keeps backward compatibility while making the intended CIDR naming clearer for future usage.
Related issues
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct