Skip to content

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