Repository navigation
chore: clear the Kotlin compiler warnings - #74
Merged
Merged
Conversation
- GitHub.kt: drop a safe call on a review already known non-null. - WorktreeOps.kt: drop an `own != null` check that `merged` already implies. - Clipboard: move the copy controls from the deprecated LocalClipboardManager to LocalClipboard, through a small Clipboard.setText helper that wraps an AWT StringSelection (the desktop ClipEntry constructor is still experimental, so the opt-in lives there). - Main.kt: replace the deprecated painterResource with the app icon decoded once from the classpath via Skia, rather than pulling in the Compose resources library for one PNG. It loads through our own class, so it no longer depends on the thread's context class loader. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Raman Gupta <rocketraman@gmail.com>
rocketraman
force-pushed
the
claude/kotlin-warnings-cleanup-48b0e7
branch
from
October 27, 2026 21:14
a6cfe12 to
3c644f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clears all eight warnings from the current Kotlin build.
What changed
GitHub.kt: drop the safe call inlastReview?.reactionGroups.reviewIsNewestalready guaranteeslastReviewis non-null there.WorktreeOps.kt: drop theown != nullcheck fromdeletableUpstream.mergedcan only be true whenownis non-null.CopyPill,CopyAction,CopyTarget,CopyReportPill): move from the deprecatedLocalClipboardManagertoLocalClipboard. The new API only takes aClipEntry, and on desktop that has to wrap an AWTTransferablethrough a constructor Compose still marks experimental. A smallClipboard.setText(String)helper inComponents.ktwraps aStringSelectionand holds the one@OptIn. Because the new API issuspend, the pills now copy inside a coroutine.Main.kt: replace the deprecatedpainterResource("app-icon.png")with a lazily decodedappIcon(classpath bytes → Skia →BitmapPainter), shared by the window and the title bar. I chose this over adopting the Compose resources library (generatedResclass,composeResourcesfolder) for a single PNG. It loads throughAppState::class.java, so it doesn't depend on the thread's context class loader either.Verification
:compileKotlin --rerun-tasksbuilds with no warnings. All 237 tests pass.wl-paste) and show "✓ Copied".CopyAction/CopyTarget/ the diagnostics-report pill. Those use the same helper.