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

Fix NPE in LocalRepositorySearcher.findLocalFile #450

Conversation

vrubezhny
Copy link
Contributor

[Error - 4:46:44 AM] Jul 22, 2023 04:46:44 org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant collectArtifactDescription()
Message: java.lang.NullPointerException: Cannot invoke "String.replace(char, char)" because the return value of "org.apache.maven.model.Dependency.getGroupId()" is null
java.lang.NullPointerException: Cannot invoke "String.replace(char, char)" because the return value of "org.apache.maven.model.Dependency.getGroupId()" is null
	at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher.findLocalFile(LocalRepositorySearcher.java:133)
	at org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant.collectArtifactDescription(MavenHoverParticipant.java:394)
	at org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant.onText(MavenHoverParticipant.java:145)
	at org.eclipse.lemminx.services.XMLHover.getTextHover(XMLHover.java:214)
	at org.eclipse.lemminx.services.XMLHover.doHover(XMLHover.java:99)
	at org.eclipse.lemminx.services.XMLLanguageService.doHover(XMLLanguageService.java:185)
	at org.eclipse.lemminx.XMLTextDocumentService.lambda$hover$5(XMLTextDocumentService.java:281)
	at org.eclipse.lemminx.commons.ModelTextDocuments.lambda$computeModelAsync$0(ModelTextDocuments.java:118)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	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)

```
[Error - 4:46:44 AM] Jul 22, 2023 04:46:44 org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant collectArtifactDescription()
Message: java.lang.NullPointerException: Cannot invoke "String.replace(char, char)" because the return value of "org.apache.maven.model.Dependency.getGroupId()" is null
java.lang.NullPointerException: Cannot invoke "String.replace(char, char)" because the return value of "org.apache.maven.model.Dependency.getGroupId()" is null
	at org.eclipse.lemminx.extensions.maven.searcher.LocalRepositorySearcher.findLocalFile(LocalRepositorySearcher.java:133)
	at org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant.collectArtifactDescription(MavenHoverParticipant.java:394)
	at org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant.onText(MavenHoverParticipant.java:145)
	at org.eclipse.lemminx.services.XMLHover.getTextHover(XMLHover.java:214)
	at org.eclipse.lemminx.services.XMLHover.doHover(XMLHover.java:99)
	at org.eclipse.lemminx.services.XMLLanguageService.doHover(XMLLanguageService.java:185)
	at org.eclipse.lemminx.XMLTextDocumentService.lambda$hover$5(XMLTextDocumentService.java:281)
	at org.eclipse.lemminx.commons.ModelTextDocuments.lambda$computeModelAsync$0(ModelTextDocuments.java:118)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	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)
```
@vrubezhny vrubezhny merged commit f279aeb into eclipse:master Jul 22, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant