8000 Fixed confusing parameter name in CNAMERecord by chkal · Pull Request #354 · dnsjava/dnsjava · GitHub
[go: up one dir, main page]

Skip to content

Fixed confusing parameter name in CNAMERecord #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

chkal
Copy link
Contributor
@chkal chkal commented Nov 29, 2024

The CNAMERecord class has a constructor parameter for the CNAME target which is called alias at the moment. This is quite confusing, because:

  • The API docs states that this parameter is "The name to which the CNAME alias points". So it is NOT the alias itself (which is the name of the record), but the target to which the record points.
  • There is a deprecated method CNAMERecord#getAlias() which does NOT return the value supplied with the alias constructor parameter, but returns the name of the record instead.

I think it would be help to rename this parameter to target. That is also consistent with the name used in NSRecord and PTRRecord.

@ibauersachs
Copy link
Member

Agree. Thanks for the cleanup!

@ibauersachs ibauersachs merged commit d445fe8 into dnsjava:master Nov 29, 2024
14 checks passed
@ibauersachs ibauersachs added this to the v3.6.3 milestone Nov 29, 2024
@chkal chkal deleted the fix-cname-parameter-name branch November 29, 2024 11:16
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
0