Skip to content

fix(plugin): resolve deprecated API warnings#61

Merged
guodong-sq merged 1 commit intomainfrom
guodong/fix-deprecated-api-warnings
Mar 29, 2026
Merged

fix(plugin): resolve deprecated API warnings#61
guodong-sq merged 1 commit intomainfrom
guodong/fix-deprecated-api-warnings

Conversation

@guodong-sq
Copy link
Copy Markdown
Collaborator

@guodong-sq guodong-sq commented Mar 29, 2026

Summary

  • Replace deprecated makeRootsChange(Runnable, Boolean, Boolean) with RootsChangeRescanningInfo overload
  • Replace deprecated ActionUtil.invokeAction(action, component, ...) with ActionUtil.performAction(action, event)
  • Use explicit getDirectoryMappings() instead of deprecated Kotlin synthetic property
  • Remove unnecessary safe calls on smart-cast non-null receivers
  • Remove redundant else in exhaustive when on sealed class
  • Remove always-true is String type checks in tests

Build produces zero compiler warnings after these changes.

Test plan

  • ./gradlew clean build --no-build-cache passes with zero w: warnings
  • ./gradlew test passes
  • Manual: switch worktree in IDE, verify refresh works
  • Manual: click PR/context buttons in worktree panel

🤖 Generated with Claude Code

- Replace `makeRootsChange(Runnable, Boolean, Boolean)` with
  `makeRootsChange(Runnable, RootsChangeRescanningInfo)` in SymlinkSwitchService
- Use explicit `getDirectoryMappings()` call instead of deprecated
  Kotlin synthetic property accessor in SymlinkSwitchService
- Replace deprecated `ActionUtil.invokeAction(action, component, ...)`
  with `ActionUtil.performAction(action, event)` in WorktreePanel
- Remove unnecessary safe calls on smart-cast non-null receivers
  in ExternalChangeWatcher
- Remove redundant `else` branch in exhaustive `when` on sealed class
  in WorktreePanel
- Remove always-true `is String` type checks in TerminalNavigatorTest

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@guodong-sq guodong-sq merged commit fb349b0 into main Mar 29, 2026
6 checks passed
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