fix: improve error reporting and inline method support (#43) #44

Merged
fred merged 1 commit from fix/43-refactoring-errors into main 2026-03-08 13:16:57 +00:00
Collaborator

Summary

Addresses easy/medium issues from #43 (cross-module refactoring failures):

  • Null error messages: move_type, change_method_signature, inline now log full stack traces and show actual exception info instead of "null" when getMessage() is empty
  • "Potential matches" blocking rename: getRealErrors() now skips "potential match" warnings that incorrectly blocked interface method renames in headless mode
  • Inline method support: Added InlineMethodRefactoring fallback — jdt_inline now supports both local variables and methods (previously only local variables)

Not yet addressed (harder issues from #43)

  • move_type underlying NPE with MoveDescriptor in headless mode
  • change_method_signature NPE for interface methods with cross-module implementations
  • rename_element METHOD missing method-reference :: updates in AST fallback

Test plan

  • jdt_inline on a method → should inline instead of "No inlineable element"
  • jdt_rename_element on interface method → should proceed instead of "potential matches" error
  • jdt_move_type failure → error message now shows actual exception, not just "null"
  • jdt_change_method_signature failure → error shows exception type and cause

🤖 Generated with Claude Code

## Summary Addresses easy/medium issues from #43 (cross-module refactoring failures): - **Null error messages**: `move_type`, `change_method_signature`, `inline` now log full stack traces and show actual exception info instead of `"null"` when `getMessage()` is empty - **"Potential matches" blocking rename**: `getRealErrors()` now skips "potential match" warnings that incorrectly blocked interface method renames in headless mode - **Inline method support**: Added `InlineMethodRefactoring` fallback — `jdt_inline` now supports both local variables and methods (previously only local variables) ## Not yet addressed (harder issues from #43) - `move_type` underlying NPE with MoveDescriptor in headless mode - `change_method_signature` NPE for interface methods with cross-module implementations - `rename_element` METHOD missing method-reference `::` updates in AST fallback ## Test plan - [ ] `jdt_inline` on a method → should inline instead of "No inlineable element" - [ ] `jdt_rename_element` on interface method → should proceed instead of "potential matches" error - [ ] `jdt_move_type` failure → error message now shows actual exception, not just "null" - [ ] `jdt_change_method_signature` failure → error shows exception type and cause 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- move_type, change_method_signature, inline: log stack traces and show
  actual exception info instead of "null" when getMessage() is empty
- getRealErrors: skip "potential match" warnings that incorrectly block
  interface method renames in headless mode
- inline: add InlineMethodRefactoring fallback when InlineTempRefactoring
  fails (supports method inlining, not just local variables)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fred force-pushed fix/43-refactoring-errors from 3c9f63bdda to 5a0afc41a2
Some checks failed
Build and Release / build (push) Failing after 3h0m0s
2026-03-08 13:13:27 +00:00
Compare
fred merged commit 5a0afc41a2 into main 2026-03-08 13:16:57 +00:00
fred deleted branch fix/43-refactoring-errors 2026-03-08 13:16:57 +00:00
Sign in to join this conversation.
No description provided.