Skip to content

refactor: port ResendController to Kotlin - #280

Open
toku-sa-n wants to merge 1 commit into
DeNA:masterfrom
toku-sa-n:refactor/kotlinize-resend-controller
Open

toku-sa-n wants to merge 1 commit into
DeNA:masterfrom
toku-sa-n:refactor/kotlinize-resend-controller

Conversation

@toku-sa-n

Copy link
Copy Markdown
Contributor

ResendController.javaをKotlinで書き直しました。

  • シングルトン(getInstance())の書き方は refactor: port ListenPortManager to Kotlin #269(ListenPortManager)に合わせています。

  • Javaの呼び出し元をそのまま動かすため、resend() のオーバーロードは @JvmOverloads で生成し、ResendWorker は無名クラスで継承できるよう open class にしています。

  • 重複していた OneShotPacket の組み立てをヘルパーにまとめました(挙動は変えていません)。

  • ./gradlew build(spotless・テストを含む)が通ることを確認しました。

  • By placing an "x" in the box, I hereby understand, accept and agree to be bound by the terms and conditions of the Contribution License Agreement.

🤖 Generated with Claude Code

Rewrite ResendController (and its nested ResendWorker) from Java to Kotlin
as the first step toward porting the files touched by the History resend
log work one at a time. The singleton follows the ListenPortManager port
(DeNA#269): a private constructor with a double-checked @volatile instance and
@JvmStatic getInstance().

The public API is kept so Java callers continue to work unchanged:
resend() overloads are generated with @jvmoverloads, and ResendWorker is
an open class so callers can still subclass it anonymously and override
process(). The duplicated OneShotPacket construction is pulled into a
helper without changing behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@toku-sa-n
toku-sa-n marked this pull request as ready for review November 19, 2026 06:00
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.

1 participant