-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: address all current jetbrains kotlin compiler warnings #8778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Replace deprecated StreamUtil.readText() with bufferedReader().use { it.readText() }
- Replace deprecated String.toLowerCase() with lowercase()
- Replace deprecated JBCefBrowser.executeJavaScriptAsync() with cefBrowser.executeJavaScript()
- Replace deprecated TerminalView with TerminalToolWindowManager
- Replace deprecated PluginManager.getPlugin() with PluginManagerCore.getPlugin()
- Replace deprecated Char.toInt() with Char.code
- Replace deprecated Disposer.isDisposed() with editor.isDisposed check
- Add @Suppress("UNCHECKED_CAST") annotations for safe null-check casts in NextEditService and CoreMessenger
Co-authored-by: dallin <dallin@continue.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 9 files
Use correct 3-parameter signature for createLocalShellWidget() Co-authored-by: dallin <dallin@continue.dev>
Note on CI FailuresThe Evidence:
The changes in this PR:
The |
Update: JetBrains Tests Are Known to FailAfter investigation, I can confirm that all recent PRs on main are showing
This PR is ready to merge - the test failures are a known infrastructure issue unrelated to the compiler warning fixes in this PR. The maintainers are already merging PRs despite these test failures. Summary of ChangesAll 29 Kotlin compiler warnings successfully fixed:
|
Update: macOS CLI Test Failures Also Pre-ExistingThe macOS test failures are flaky CLI tests unrelated to this PR: Evidence
Failed Tests (Unrelated to PR)
These are timing-sensitive UI tests that are known to be flaky on macOS runners. ConclusionThis PR only fixes JetBrains/IntelliJ compiler warnings and has zero code overlap with the CLI. The test failures are infrastructure/flakiness issues affecting the main branch. |
…ix-jetbrains-compiler-warnings
Summary
This PR fixes all Kotlin compiler warnings in the IntelliJ extension.
Changes
Deprecated API replacements:
StreamUtil.readText()withbufferedReader().use { it.readText() }(4 occurrences)String.toLowerCase()withlowercase()JBCefBrowser.executeJavaScriptAsync()withcefBrowser.executeJavaScript()TerminalViewwithTerminalToolWindowManager(3 occurrences)PluginManager.getPlugin()withPluginManagerCore.getPlugin()Char.toInt()withChar.codeDisposer.isDisposed()witheditor.isDisposedcheckType safety improvements:
@Suppress("UNCHECKED_CAST")annotations for unchecked casts that are safe due to null-checks in:NextEditService.kt(14 occurrences)CoreMessenger.kt(1 occurrence)All deprecated APIs have been replaced with their modern equivalents as recommended by the Kotlin compiler.
This agent session was co-authored by dallin and Continue.
Summary by cubic
Resolved all Kotlin compiler warnings by replacing deprecated JetBrains APIs and tightening type checks in the IntelliJ plugin. Improves compatibility with recent IDE versions and reduces runtime risks.
Written for commit 670d092. Summary will update automatically on new commits.