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

Issue 720: Fixed Null Pointer Exception #721

Merged
merged 1 commit into from
May 11, 2022
Merged

Conversation

kaufmann1
Copy link

@kaufmann1 kaufmann1 commented Apr 27, 2022

Description of the new Feature/Bugfix

Prevents NullPointerException on some PDFs

Related Issue: #720

Unit-Tests for the new Feature/Bugfix

  • Unit-Tests added to reproduce the bug
  • Unit-Tests added to the added feature

Compatibilities Issues

I don't think so. I created breakpoint at PdfArray kidsPR = page.getAsArray(PdfName.KIDS);
and when PdfDictionary page was null I forced a return, so that the programm wouldn't hit the NullPointerException.
Then the PDF could be read and was processed by my application.

Testing details

Sorry for not providing a test file here, but the PDF contains some sensitive data which I'm not allowed to share.

Sorry, something went wrong.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@kaufmann1 kaufmann1 changed the title Issue 718: Fixed Null Pointer Exception Issue 720: Fixed Null Pointer Exception Apr 27, 2022
@andreasrosdal
Copy link
Contributor

Thanks for making this pull request. I hope that this pull request can be accepted, to solve the NullPointerException.

@asturio asturio linked an issue May 11, 2022 that may be closed by this pull request
@asturio asturio merged commit 8d09a2c into LibrePDF:master May 11, 2022
@asturio asturio added this to the 1.3.28 milestone May 11, 2022
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 opening PDF
4 participants