Re-factor the XRef class to use private fields#21631
Conversation
Part of this is very old code, hence modernizing it a little bit more really shouldn't hurt. This patch also shortens some `XRef` code by using nullish coalescing assignment respectively ternary operators more. Finally, adds the recently introduced `countUpdatesAfter` method to the `XRefMock`/`XRefWrapper` classes to avoid having to check for its existence.
In the `pr4731.pdf` document the trailer is actually a Stream, rather than the expected Dictionary, hence update the "nested trailer dictionary" check to make that clearer. *Note:* This is something that I happened to noticed while working on the previous patch.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21631 +/- ##
=======================================
Coverage 89.84% 89.85%
=======================================
Files 263 263
Lines 66811 66802 -9
=======================================
- Hits 60029 60023 -6
+ Misses 6782 6779 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/botio browsertest |
From: Bot.io (Linux m4)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/fcd096ae68bc8af/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/aa3507aedadde49/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/fcd096ae68bc8af/output.txt Total script time: 18.02 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/aa3507aedadde49/output.txt Total script time: 23.06 mins
|
Re-factor the
XRefclass to use private fieldsPart of this is very old code, hence modernizing it a little bit more really shouldn't hurt.
This patch also shortens some
XRefcode by using nullish coalescing assignment respectively ternary operators more.Finally, adds the recently introduced
countUpdatesAftermethod to theXRefMock/XRefWrapperclasses to avoid having to check for its existence.Re-factor the "nested trailer dictionary" check (PR 4731 follow-up)
In the
pr4731.pdfdocument the trailer is actually a Stream, rather than the expected Dictionary, hence update the "nested trailer dictionary" check to make that clearer.Note: This is something that I happened to noticed while working on the previous patch.