FIX: Skip manifest entries absent from ZIP in getXmlEntries()#286
Open
carlwilson wants to merge 3 commits intomainfrom
Open
FIX: Skip manifest entries absent from ZIP in getXmlEntries()#286carlwilson wants to merge 3 commits intomainfrom
carlwilson wants to merge 3 commits intomainfrom
Conversation
Member
carlwilson
commented
Mar 4, 2026
- Profile rules (SchematronRule, MacroRule) iterate over getXmlEntries() and attempt to stream each entry. If a file is listed in the manifest but missing from the ZIP
- a condition already correctly reported as MAN-4
- the underlying ZipFileProcessor threw an unchecked NoSuchElementException, surfacing as a fatal SYS-4 crash.
- Fix filters getXmlEntries() to only return entries that exist in both the manifest and the ZIP archive, so profile rules never attempt to read phantom entries.
- Resolves 0.18.5 and 0.20 SYS-4: [FATAL] <file> could not be parsed, due to an exception. An unexpected error occurred during validation: java.util.NoSuchElementException: Entry styles.xml not found in zip file #282.
The zero-argument form of Rules.getDnaProfile() was removed when the isExtended parameter was introduced in 0.20. Adds it back as an overload delegating to getDnaProfile(false), preserving the previous default behaviour for existing callers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A few stack trace prints were left in after debugging, these have been removed. Closes #283
- Profile rules (SchematronRule, MacroRule) iterate over getXmlEntries() and attempt to stream each entry. If a file is listed in the manifest but missing from the ZIP — a condition already correctly reported as MAN-4 — the underlying ZipFileProcessor threw an unchecked NoSuchElementException, surfacing as a fatal SYS-4 crash. - Fix filters getXmlEntries() to only return entries that exist in both the manifest and the ZIP archive, so profile rules never attempt to read phantom entries. - Resolves #282.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.