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: fail gracefully when running on a non-EPUB file #1134

Merged
merged 1 commit into from
May 1, 2020

Conversation

rdeltour
Copy link
Member

Running EPUBCheck on a non-EPUB package file (for instance an Office
Open XML document) caused a a NullPointerException.
It now fails gracefully with a fatal error (RSC-002) potentially followed
by side-effect errors (typically RSC-001, PKG-006).

Fixes #1050

Running EPUBCheck on a non-EPUB package file (for instance an Office
Open XML document) caused a a `NullPointerException`.
It now fails gracefully with a fatal error (RSC-002) potentially followed
by side-effect errors (typically RSC-001, PKG-006).

Fixes #1050
@rdeltour rdeltour added this to the 4.2.3 milestone Apr 30, 2020
@rdeltour rdeltour self-assigned this Apr 30, 2020
@rdeltour rdeltour merged commit 2083f05 into master May 1, 2020
@rdeltour rdeltour deleted the fix/1050/validate-a-non-epub branch May 1, 2020 14:22
karenhanson added a commit to karenhanson/jhove that referenced this pull request Oct 21, 2020
Two changes to EPUBCheck were causing the tests to change:
The first changes the error messages returned for validation of a non-EPUB:
w3c/epubcheck#1134
The solution was to change the message count.
The second downgrades the encrypted file message to INFO
w3c/epubcheck#1136
The original implementation of the JHOVE EPUB module did not include INFO messages generated by EPUBCheck in the JHOVE report, but looking at the kinds of messages that might be listed as INFO messages I thought it might be useful to include them. The change to add INFO messages is reflected in this commit.
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.

NullPointerException when attempting to "doValidate" on a non-epub
1 participant