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

False positive PDF-HUL-94 java.lang.NullPointerException #809

Closed
asciim0 opened this issue Jan 2, 2023 · 4 comments · Fixed by #820
Closed

False positive PDF-HUL-94 java.lang.NullPointerException #809

asciim0 opened this issue Jan 2, 2023 · 4 comments · Fixed by #820

Comments

@asciim0
Copy link
Contributor

asciim0 commented Jan 2, 2023

The attached file throws a PDF-HUL-94 NullPointerException but seems to be syntactially ok.
Cross-checked the file with Preflight, qpdf and pdfcpu.
Pdfcpu did report an error for the /Tabs entry in the PagesDictionary as /Tabs is not supported with the claimed PDF version 1.4 of the file ... however, since JHOVE should only check agianst the 1.7 ISO spec, and is not version-feature-exact for anything y 1.7 this shouldn't make a difference,

Due to no futher info on the validation error and due to no negative results with other tools I consider this currently a false positive.

algenreportNordsee_06082021.pdf

@asciim0
Copy link
Contributor Author

asciim0 commented Jan 2, 2023

There's apparently no relation between the /Tabs entry and the NullPointer. If someone can let me know what check triggers the NullPointer exception, I can maybe pinpoint the error a little bit from there.

@samalloing
Copy link
Collaborator

Hi @asciim0

This problem is solved in the next relase of jHove 1.28. The problem is that Subject and Keyword are empty (null). That nullPointerException is handled now (see #782)

Sam

@asciim0
Copy link
Contributor Author

asciim0 commented Jan 11, 2023

Awesome, thanks Sam! Will crosscheck with 1.28.

@carlwilson
Copy link
Member

Hi both, I've created a new version of this PR #820, which I think is safer but achieves its aims in less code. @asciim0 I've added your test file to the regression corpus and can confirm that the fix means it's now Well-formed and valid. @samalloing could you take a look at #820 and let me know what you think. Once it's merged I'll put a link to a test build here.

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 a pull request may close this issue.

3 participants