Visitar URL original
Flip wiring of Dns.SYSTEM by swankjesse · Pull Request #9682 · lysine-dev/okhttp · GitHub
Skip to content

Flip wiring of Dns.SYSTEM - #9682

Merged
swankjesse merged 1 commit into
mainfrom
jwilson.0815.invert_ioc
Aug 15, 2026
Merged

swankjesse merged 1 commit into
mainfrom
jwilson.0815.invert_ioc

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

Previously Dns.SYSTEM was a constant, and Platform.platformDns() was a hook to return something different.

With this change, Dns.SYSTEM forwards to whatever Platform.systemDns currently returns.

Previously Dns.SYSTEM was a constant, and Platform.platformDns() was a
hook to return something different.

With this change, Dns.SYSTEM forwards to whatever Platform.systemDns
currently returns.
@swankjesse
swankjesse requested a review from yschimke August 15, 2026 14:04
*/
@JvmField
val SYSTEM: Dns = DnsSystem()
val SYSTEM: Dns =

@yschimke yschimke Aug 15, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we provide a Dns.InetAddressDns to allow getting back the existing behaviour?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don’t think we need that yet. Dns.SYSTEM currently always does that.

I’d like to make SYSTEM point at AndroidDns with includeServiceMetadata=true later. Once the calling code has more parallelism.

*/
@JvmField
val SYSTEM: Dns = DnsSystem()
val SYSTEM: Dns =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This did make me question the meaning of "SYSTEM", I was figuring SYSTEM remained as is, and OkHttpClient defaulted to Platform.dns()

But I think I'm ok with it.

@swankjesse
swankjesse merged commit fb582e9 into main Aug 15, 2026
23 of 25 checks passed
@swankjesse
swankjesse deleted the jwilson.0815.invert_ioc branch August 15, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants