[Kotlin] Replace deprecated Ktor base64 encoding with Kotlin std library call#23334
[Kotlin] Replace deprecated Ktor base64 encoding with Kotlin std library call#23334rlnt wants to merge 1 commit intoOpenAPITools:masterfrom
Conversation
There was a problem hiding this comment.
No issues found across 2 files
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
|
please follow step 3 to update the samples so that CI can verify the change |
|
Problem being I am on Windows, and I have no WSL, nor do I plan to install it just for this PR. I leave it as a draft, and if a maintainer wants to finish it, that would be nice. I only submitted the PR because you asked for it in the linked issue to get things started. Sorry for the inconvenience, but installing a Linux kernel just for a PR is not worth it for me personally 😄 |
|
don't worry. we will update the samples later is it correct to say that you've tested this fix locally to confirm it works for your use cases in the production environment? |
|
Yes, I used a template override and regenerated the API client to make sure the deprecation message is gone. |
|
merged via #23345 (you as co-author) with updated samples |
This pull request fixes the usage of the Base64 encoding coming from Ktor with a call to the Kotlin standard library. The old method was marked deprecated with Ktor 3.4.0.
PR checklist
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)"fixes #123"present in the PR description)@karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) @dennisameling (2026/02)
fixes #22808
Summary by cubic
Replace deprecated Ktor Base64 encoding (
io.ktor.util.encodeBase64) with Kotlin stdlibkotlin.io.encoding.Base64.encodeinHttpBasicAuthfor Ktor JVM and Multiplatform clients. Removes deprecation warnings and ensures compatibility with Ktor 3.4.0 with no behavior change, fixing #22808.Written for commit 9acac9f. Summary will update on new commits.