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

ClassCastException with code action and method part #717

Closed
angelozerr opened this issue Aug 24, 2022 · 0 comments · Fixed by #718
Closed

ClassCastException with code action and method part #717

angelozerr opened this issue Aug 24, 2022 · 0 comments · Fixed by #718
Labels
bug Something isn't working qute
Milestone

Comments

@angelozerr
Copy link
Contributor

Given this Qute template:

{@java.util.List<String> strings}
{#let name=strings.get(XXX)}
	
{/let}

XXX is higlighted as an error. if you hove it (to exectute code action), you can see in the trace:

[Error - 09:27:13] Request textDocument/codeAction failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.ClassCastException: class com.redhat.qute.parser.expression.MethodPart cannot be cast to class com.redhat.qute.parser.expression.ObjectPart (com.redhat.qute.parser.expression.MethodPart and com.redhat.qute.parser.expression.ObjectPart are in unnamed module of loader 'app')
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.ClassCastException: class com.redhat.qute.parser.expression.MethodPart cannot be cast to class com.redhat.qute.parser.expression.ObjectPart (com.redhat.qute.parser.expression.MethodPart and com.redhat.qute.parser.expression.ObjectPart are in unnamed module of loader 'app')
	at com.redhat.qute.services.codeactions.QuteCodeActionForUndefinedObject.doCodeActions(QuteCodeActionForUndefinedObject.java:77)
@angelozerr angelozerr added bug Something isn't working qute labels Aug 24, 2022
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Aug 24, 2022
Fixes redhat-developer#717

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Aug 24, 2022
Fixes redhat-developer#717

Signed-off-by: azerr <azerr@redhat.com>
@datho7561 datho7561 added this to the 0.13.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working qute
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants