jdt_rename_element: NullPointerException in RefactoringTools.renameElement (v0.2.17) #39
Labels
No labels
bug
build
enhancement
headless
P1-critical
P2-high
P3-medium
P4-low
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-tools/jdt-mcp-server#39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
jdt_rename_elementthrows aNullPointerExceptionin v0.2.17. This is a regression from #26 (v0.2.16), where the same operation was a silent no-op. The NPE occurs at a different location than #24 (v0.2.15).Environment
rdf/+platform/)Steps to Reproduce
Field
CACHED_ATis declared incom.culinarygraph.rdf.vocab.VocabCg(interface constant inculinarygraph-rdf-api), with 12 references in 3 files inplatform/activitypub-mgmt-adapter.Actual Result
Expected Result
CACHED_AT_TESTand all 12 references updatedAnalysis
The NPE is in
List.of()atRefactoringTools.java:158, which does not acceptnullarguments. Likely theIFieldor itsICompilationUnitis not being resolved.History
ProcessorBasedRefactoring.createChangeSUCCESSwithchildCount: 0)RefactoringTools.renameElementRetest v0.2.17-1-g76b4e6a (2026-03-08)
Setup
/tmp/mcpJdtTestmitrdf/+platform/(30 Projekte, Java 25)VocabCg#CACHED_AT(Deklaration inculinarygraph-rdf-api, 12 Referenzen in 3 Dateien inplatform/activitypub-mgmt-adapter)grepAufruf
Ergebnis
Deklaration umbenannt, Referenzen NICHT aktualisiert:
CACHED_AT_TESTnur inVocabCg.java(1x)CACHED_ATweiterhin in 12 Stellen inplatform/— Code ist danach kaputtVergleich zur History
ProcessorBasedRefactoring.createChangeSUCCESS,childCount: 0, 0 Dateien geändert)RefactoringTools.renameElementFazit
fallback: true→ der reguläre JDT-Refactoring-Pfad greift nicht, AST-Fallback kennt nur die lokale Dateigit checkout .zurückgesetzt