Skip to content

fix: correct kuri-bind KDoc/test/message accuracy gaps#136

Open
OmarAlJarrah wants to merge 1 commit into
mainfrom
b3-bind-small-fixes
Open

fix: correct kuri-bind KDoc/test/message accuracy gaps#136
OmarAlJarrah wants to merge 1 commit into
mainfrom
b3-bind-small-fixes

Conversation

@OmarAlJarrah

Copy link
Copy Markdown
Member

Summary

  • BuilderSink's interface KDoc and a BuilderSinkTest section header both described a "verbatim-join userinfo" path in UriBuilderSink that was never implemented; both sinks actually split-encode-then-join userinfo identically, and fragment encoding is a single shared interface default rather than a per-profile override.
  • KuriBind's "root not annotated" error message built the annotation name via profile.name.lowercase(), producing @url/@uri instead of the real PascalCase @Url/@Uri markers — anyone debugging the message would be pointed at a symbol that doesn't exist. Two existing tests asserted on the old lowercase text and are updated to match the corrected message.
  • JavaBean.java's fixture doc claimed it covers types kotlin-reflect exposes no memberProperties for; it actually exercises the opposite case — MemberScanner's getter-to-property annotation-merge branch — since kotlin-reflect does return a property for this bean, just with no annotations of its own.
  • BindOptionsTest's maxDepth range test asserted both rejection boundaries (0, 513) but never confirmed the accepted upper bound (512) actually constructs, leaving a narrowing off-by-one regression undetected.

Test plan

  • ./gradlew :kuri-bind:jvmTest :kuri-bind:ktlintCheck :kuri-bind:detekt :kuri-bind:apiCheck — all green
  • Confirmed the two message-casing test assertions (KuriBindTest, IntegrationTest) fail against the unfixed source, then pass after the fix
  • kuri-bind has no js/wasmJs target, so jsNodeTest/wasmJsNodeTest do not apply
  • No public API shape changed, so apiDump was not needed

Closes #118
Closes #119
Closes #125
Closes #126

Fixes four small documentation and test accuracy issues found while
reading through kuri-bind:

- BuilderSink's interface KDoc and a BuilderSinkTest section header both
  described a "verbatim-join userinfo" path in UriBuilderSink that was
  never implemented; both sinks split-encode-then-join userinfo
  identically, and fragment encoding is a single shared interface
  default rather than a per-profile override.
- KuriBind's "root not annotated" error message built the annotation
  name via profile.name.lowercase(), producing "@url"/"@uri" instead of
  the real PascalCase "@url"/"@uri" markers, which would send anyone
  debugging the message toward a symbol that doesn't exist. Two existing
  tests (KuriBindTest, IntegrationTest) asserted on the old lowercase
  text and are updated to match the corrected message.
- JavaBean.java's fixture doc claimed it covers types kotlin-reflect
  exposes no memberProperties for; it actually exercises the opposite
  case (MemberScanner's getter-to-property annotation-merge branch),
  since kotlin-reflect does return a property for this bean, just with
  no annotations of its own.
- BindOptionsTest's maxDepth range test asserted both rejection
  boundaries (0, 513) but never confirmed the accepted upper bound
  (512) actually constructs, leaving a narrowing off-by-one regression
  undetected.

Closes #118, #119, #125, #126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment