Skip to content

docs: fix stale KDoc in Idna.domainToUnicode and Url.toJavaUrl#144

Open
OmarAlJarrah wants to merge 1 commit into
mainfrom
e5-kdoc-accuracy
Open

docs: fix stale KDoc in Idna.domainToUnicode and Url.toJavaUrl#144
OmarAlJarrah wants to merge 1 commit into
mainfrom
e5-kdoc-accuracy

Conversation

@OmarAlJarrah

Copy link
Copy Markdown
Member

Summary

  • Idna.domainToUnicode's KDoc called NFC normalization "(deferred)" even though the function normalizes via Normalizer.nfc three lines below, and the class-level KDoc already documents NFC as fully implemented.
  • Url.toJavaUrl()'s @throws documented MalformedURLException for a not-absolute URI, but on modern JDKs that case throws the unchecked IllegalArgumentException instead, and it's unreachable through this API anyway since toJavaUrl() is toJavaUri().toURL() and every Url's href always carries a scheme. Narrowed the @throws to the case that's both correctly typed and reachable: an unregistered protocol handler.

Test plan

  • Doc-only KDoc changes, no logic touched; proofread the diff for accuracy against the actual code paths (Idna.kt lines ~148-156, JavaNetInterop.kt lines ~22/44/46).
  • No Gradle gate run (doc-only change per repo policy).

Closes #96
Closes #98

domainToUnicode's KDoc called NFC normalization "(deferred)" even
though the function normalizes via Normalizer.nfc three lines below,
and the class-level KDoc already documents NFC as fully implemented.

toJavaUrl()'s @throws documented MalformedURLException for a
not-absolute URI, but on modern JDKs that case throws the unchecked
IllegalArgumentException instead, and it's unreachable through this
API anyway since every Url's href always carries a scheme. Narrow the
@throws to the case that's both correctly typed and reachable: an
unregistered protocol handler.

Closes #96
Closes #98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant