Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(refactor): use method-call syntax for Action:rename
client-command-handlers.lua:21 used action.rename(params) (dot)
instead of action:rename(params) (colon). Since Action:rename is
defined with self, the dot-call passed params as self and left the
actual params argument as nil, causing action.lua:28 to error with
"bad argument #1 to 'ipairs' (table expected, got nil)".

All other handlers in this file already use : when calling into
Action:* methods. This brings RENAME_COMMAND in line with them.

Reproduction: in any Java file with jdtls attached, trigger a
refactoring that produces a follow-up rename (e.g. "Extract to
constant" on a string literal). jdtls fires RENAME_COMMAND with
the new symbol's location, and the handler errors before the
rename UI opens. After this fix, the rename UI opens as expected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • Loading branch information
fobbyal and claude committed Jun 5, 2026
commit e34e1078a63cc0cfa1d3aa4148ad0a28a4432402
2 changes: 1 addition & 1 deletion lua/java-refactor/client-command-handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ local M = {
---@param params java-refactor.RenameAction[]
[ClientCommand.RENAME_COMMAND] = function(params)
run('Failed to rename the symbol', function(action)
action.rename(params)
action:rename(params)
end)
end,

Expand Down
Loading