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 MavenLemminxExtension.sortProjects and the similar ones #392

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

vrubezhny
Copy link
Contributor

If a pom.xml file is empty or has inconsstent content, its DOMDocument's Document Element can be null:

Cannot invoke "org.eclipse.lemminx.dom.DOMElement.getNodeName()" because the return value of "org.eclipse.lemminx.dom.DOMDocument.getDocumentElement()" is null
at org.eclipse.lemminx.extensions.maven.MavenLemminxExtension.lambda$sortProjects$2(MavenLemminxExtension.java:460)

@vrubezhny vrubezhny marked this pull request as draft April 25, 2023 14:38
If a pom.xml file is empty or has inconsstent content, its DOMDocument's Document Element can be null:

Cannot invoke "org.eclipse.lemminx.dom.DOMElement.getNodeName()" because the return value of "org.eclipse.lemminx.dom.DOMDocument.getDocumentElement()" is null
  at org.eclipse.lemminx.extensions.maven.MavenLemminxExtension.lambda$sortProjects$2(MavenLemminxExtension.java:460)
@vrubezhny vrubezhny marked this pull request as ready for review April 25, 2023 16:44
@vrubezhny vrubezhny merged commit c17d73c into eclipse:master Apr 25, 2023
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