Skip to content

Commit

Permalink
fix(partial): Issue #5144 Avoid NPE on non-Include packageReference (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong authored Jan 13, 2023
2 parents bbb86c2 + 174f6e2 commit 6abed02
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public List<NugetPackageReference> parse(InputStream stream) throws MSBuildProje
final NamedNodeMap attrs = node.getAttributes();

final String include = attrs.getNamedItem("Include").getNodeValue();
if (include == null) {
// Issue 5144 work-around for NPE on packageReferences other than includes
continue;
}
String version = null;

if (attrs.getNamedItem("Version") != null) {
Expand Down

0 comments on commit 6abed02

Please sign in to comment.