Skip to content

CURATOR-538: address from InetSocketAddress could be null as it means unresolved address - #433

Merged
tisonkun merged 1 commit into
apache:masterfrom
snuyanzin:curator538
Aug 30, 2022
Merged

tisonkun merged 1 commit into
apache:masterfrom
snuyanzin:curator538

Conversation

@snuyanzin

Copy link
Copy Markdown
Contributor

To be aligned with contract of java.net.InetSocketAddress it should take into account that java.net.InetSocketAddress#getAddress could return null which will mean unresolved address

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution @snuyanzin!

The change looks good. But I don't know how can this patch be relevant to CURATOR-538?

@snuyanzin

Copy link
Copy Markdown
Contributor Author

hi @tisonkun thanks for the response

in fact there are 3 jira issues for the same situation CURATOR-597, CURATOR-538, CURATOR-649
every fails with NPE since the address was marked as unresolved and as a result it tries to host from address...
but at the same time for unresolved addresses address is null.... The idea is return unknown in case of unresolved addresses as for other exceptions

@snuyanzin
snuyanzin requested a review from tisonkun August 29, 2022 14:54

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your explanation!

Merging...

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