Skip to content
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

NPE on renaming a namespaced tag with no corresponding ending tag #1139

Closed
rgrunber opened this issue Dec 14, 2021 · 0 comments · Fixed by #1140
Closed

NPE on renaming a namespaced tag with no corresponding ending tag #1139

rgrunber opened this issue Dec 14, 2021 · 0 comments · Fixed by #1140
Labels
bug Something isn't working rename
Milestone

Comments

@rgrunber
Copy link
Contributor

rgrunber commented Dec 14, 2021

eg. <xs:foo> with no corresponding tag. Looks like this was the same in previous releases, so not a regression.

stacktrace
SEVERE: Internal error: java.lang.NullPointerException: Cannot invoke "org.eclipse.lsp4j.Range.getStart()" because "endTagRange" is null
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "org.eclipse.lsp4j.Range.getStart()" because "endTagRange" is null
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
    at java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1313)
    at java.base/java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1280)
    at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.lsp4j.Range.getStart()" because "endTagRange" is null
    at org.eclipse.lemminx.services.XMLRename.getTagNameRenameTextEdits(XMLRename.java:190)
    at org.eclipse.lemminx.services.XMLRename.getRenameTextEdits(XMLRename.java:105)
    at org.eclipse.lemminx.services.XMLRename.doRename(XMLRename.java:87)
    at org.eclipse.lemminx.services.XMLLanguageService.doRename(XMLLanguageService.java:240)
    at org.eclipse.lemminx.XMLTextDocumentService.lambda$rename$10(XMLTextDocumentService.java:352)
    at java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1311)
    ... 7 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rename
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants