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 NullPointerException on null rows in table #1029

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

fellmann
Copy link
Contributor

Description of the new Feature/Bugfix

Describe here how you fixed the bug, or implemented the new feature.

Related Issue: #1028

Unit-Tests for the new Feature/Bugfix

  • Unit-Tests added to reproduce the bug

@andreasrosdal

This comment was marked as outdated.

@fellmann
Copy link
Contributor Author

@andreasrosdal This would be my approach. Note the null pointer check in the first loop instead of second.
The first loop (https://github.com/LibrePDF/OpenPDF/pull/1029/files#diff-f8ff0e0467d7f9125d29b3c1f5f96b40a8bb603ae719effd248bdd3f97753d97L882) lists all rows within the rowspan that should be used to distribute the excess height, which is then done in the second loop. So the null check in the first loop is sufficient.
Yet, there are more places where no null check is done, I tried to fix those too.

@andreasrosdal

This comment was marked as outdated.

@fellmann

This comment was marked as outdated.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@andreasrosdal andreasrosdal merged commit 0c2b5b8 into LibrePDF:master Jan 19, 2024
6 checks passed
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.

2 participants