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

NullPointerException during fault tolerance completion participant #337

Open
datho7561 opened this issue Jan 5, 2023 · 0 comments
Open
Labels
bug Something isn't working completion

Comments

@datho7561
Copy link
Contributor

If you open completion in an empty Java file in a project that has MicroProfile Fault Tolerance, you get the following logged in the JDT-LS logs:

SEVERE: Error while calling collectCompletionItems
java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.IJavaElement.getElementType()" because "element" is null
	at org.eclipse.lsp4mp.jdt.internal.faulttolerance.java.MicroProfileFaultToleranceCompletionParticipant.getFallbackAnnotation(MicroProfileFaultToleranceCompletionParticipant.java:102)
	at org.eclipse.lsp4mp.jdt.internal.faulttolerance.java.MicroProfileFaultToleranceCompletionParticipant.collectCompletionItems(MicroProfileFaultToleranceCompletionParticipant.java:72)
	at org.eclipse.lsp4mp.jdt.internal.core.java.completion.JavaCompletionDefinition.collectCompletionItems(JavaCompletionDefinition.java:59)
	at org.eclipse.lsp4mp.jdt.core.PropertiesManagerForJava.lambda$5(PropertiesManagerForJava.java:213)
	at java.base/java.util.ArrayList.forEach(Unknown Source)
	at org.eclipse.lsp4mp.jdt.core.PropertiesManagerForJava.completion(PropertiesManagerForJava.java:212)
	at org.eclipse.lsp4mp.jdt.internal.core.ls.MicroProfileDelegateCommandHandlerForJava.getCompletionForJava(MicroProfileDelegateCommandHandlerForJava.java:290)
	at org.eclipse.lsp4mp.jdt.internal.core.ls.MicroProfileDelegateCommandHandlerForJava.executeCommand(MicroProfileDelegateCommandHandlerForJava.java:89)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:561)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:79)
	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)
@datho7561 datho7561 added bug Something isn't working completion labels Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completion
Projects
None yet
Development

No branches or pull requests

1 participant