Skip to content

Commit

Permalink
FIX: Policy crash when package has no manifest
Browse files Browse the repository at this point in the history
- added check for null manifest when attempting to list package XML files.

Closes #193
  • Loading branch information
carlwilson committed Oct 29, 2024
1 parent 5cc8750 commit 23d0837
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ public List<String> getXmlEntryPaths() {
@Override
public Set<FileEntry> getXmlEntries() {
Set<FileEntry> entries = new HashSet<>();
for (FileEntry entry : this.manifest.getEntriesByMediaType("text/xml")) {
entries.add(entry);
if (this.manifest != null) {
for (FileEntry entry : this.manifest.getEntriesByMediaType("text/xml")) {
entries.add(entry);
}
}
return entries;
}
Expand Down

0 comments on commit 23d0837

Please sign in to comment.