Skip to content

Starting from version 1.36.0 it is not possible to use the Quick fix Add constructor in classes that use inheritanceΒ #3905

@ramonnascimento-montreal

Description

Starting from version 1.36.0 it is not possible to use the Quick fix Add constructor in classes that use inheritance.

I tried following the Troubleshooting guide recommendations and also manually cleaning the workspaceStorage directory. Even reinstalling vscode among other alternatives, the only one that worked was installing the vscode extension from version 1.35.1 downwards.

Sample class

Image

Language Support for Java log

dez. 26, 2024 12:53:02 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
GRAVE: Internal error: org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
java.util.concurrent.CompletionException: org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
	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$UniApply.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: org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:119)
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:104)
	at org.eclipse.jface.text.Position.<init>(Position.java:65)
	at org.eclipse.jface.text.link.LinkedPosition.<init>(LinkedPosition.java:46)
	at org.eclipse.jdt.ls.core.internal.contentassist.SnippetUtils.addSnippetsIfApplicable(SnippetUtils.java:134)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionResolveHandler.resolve(CodeActionResolveHandler.java:54)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$15(JDTLanguageServer.java:786)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	... 7 more

Developer tools log

  ERR Internal error.: Error: Internal error.
	at c:\Users\ramon.nascimento\.vscode\extensions\redhat.java-1.36.0-win32-x64\dist\extension.js:2:1072098
	at re (c:\Users\ramon.nascimento\.vscode\extensions\redhat.java-1.36.0-win32-x64\dist\extension.js:2:1072392)
	at c:\Users\ramon.nascimento\.vscode\extensions\redhat.java-1.36.0-win32-x64\dist\extension.js:2:1067176
	at Immediate.<anonymous> (c:\Users\ramon.nascimento\.vscode\extensions\redhat.java-1.36.0-win32-x64\dist\extension.js:2:1067196)
	at process.processImmediate (node:internal/timers:483:21)

Other details

The project is a simple class but I'm uploading it:

AddConstructor.zip

Environment

Operating System: Windows 10 Pro x64
JDK version: Eclipse Adoptium JDK 8 / 17 (both can reproduce the problem)
Visual Studio Code version: 1.96.2
Language Support for Java(TM) by Red Hat version: 1.38.0 to 1.36.0

Video demonstration

1.36.0 version (not working): https://vimeo.com/1042281037/c6bad7911b
1.35.1 version (working): https://vimeo.com/1042284085/46e808f05a

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions