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 with Codelens in empty XSD file #684

Closed
angelozerr opened this issue May 9, 2020 · 1 comment · Fixed by #763 or enxio/lsp4xml#58
Closed

NPE with Codelens in empty XSD file #684

angelozerr opened this issue May 9, 2020 · 1 comment · Fixed by #763 or enxio/lsp4xml#58
Assignees
Labels
bug Something isn't working codelens good first issue Good for newcomers XSD
Milestone

Comments

@angelozerr
Copy link
Contributor

Create an empty XSD file, activate Codelens and type a space:

Caused by: java.lang.NullPointerException
	at org.eclipse.lemminx.extensions.xsd.utils.XSDUtils.getTargetAttrs(XSDUtils.java:305)
	at org.eclipse.lemminx.extensions.xsd.utils.XSDUtils.searchXSOriginAttributes(XSDUtils.java:258)
	at org.eclipse.lemminx.extensions.xsd.participants.XSDCodeLensParticipant.doCodeLens(XSDCodeLensParticipant.java:50)
	at org.eclipse.lemminx.services.XMLCodeLens.getCodelens(XMLCodeLens.java:42)
	at org.eclipse.lemminx.services.XMLLanguageService.getCodeLens(XMLLanguageService.java:244)
	at org.eclipse.lemminx.XMLTextDocumentService.lambda$codeLens$17(XMLTextDocumentService.java:377)
	at java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1236)
@angelozerr angelozerr added bug Something isn't working codelens labels May 9, 2020
@fbricon fbricon added good first issue Good for newcomers XSD labels May 19, 2020
@datho7561
Copy link
Contributor

I'd be interested in this issue

@fbricon fbricon added this to the 0.12.0 milestone Jun 3, 2020
datho7561 added a commit to datho7561/lemminx that referenced this issue Jun 4, 2020
Added some null checks to prevent the NPE occuring.

Fixes eclipse-lemminx#684
datho7561 added a commit to datho7561/lemminx that referenced this issue Jun 4, 2020
Added some null checks to prevent the NPE occuring.

Fixes eclipse-lemminx#684

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Jun 4, 2020
Added some null checks to prevent the NPE occuring.

Fixes eclipse-lemminx#684

Signed-off-by: David Thompson <davthomp@redhat.com>
angelozerr pushed a commit that referenced this issue Jun 4, 2020
Added some null checks to prevent the NPE occuring.

Fixes #684

Signed-off-by: David Thompson <davthomp@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codelens good first issue Good for newcomers XSD
Projects
None yet
3 participants