Skip to content

refactor(api): move DeletingRandomAccessFile to CustomPDFDocumentFactory as a private static class - #7344

Merged
Frooodle merged 2 commits into
Stirling-Tools:mainfrom
balazs-szucs:fix-sample-code-in-profd
Aug 13, 2026
Merged

refactor(api): move DeletingRandomAccessFile to CustomPDFDocumentFactory as a private static class#7344
Frooodle merged 2 commits into
Stirling-Tools:mainfrom
balazs-szucs:fix-sample-code-in-profd

Conversation

@balazs-szucs

Copy link
Copy Markdown
Collaborator

Description of Changes

It was in a seperate dir (app/common/src/main/java/org/apache/pdfbox/examples/util/) which i felt out of place for it.


Checklist

General

Documentation

Translations (if applicable)

UI Changes (if applicable)

  • Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR)

Testing (if applicable)

  • I have run task check to verify linters, typechecks, and tests pass
  • I have tested my changes locally. Refer to the Testing Guide for more details.

@balazs-szucs
balazs-szucs requested review from a team and Ludy87 as code owners August 7, 2026 20:02
Copilot AI review requested due to automatic review settings August 7, 2026 20:02
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines ignoring generated files. label Aug 7, 2026
@stirlingbot stirlingbot Bot added Java Pull requests that update Java code API API-related issues or pull requests refactor Code changes that neither fix a bug nor add a feature labels Aug 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors PDFBox temp-file handling by relocating DeletingRandomAccessFile from an org.apache.pdfbox.examples.*-namespaced utility into CustomPDFDocumentFactory, making it a private implementation detail where it’s actually used.

Changes:

  • Removed the external org.apache.pdfbox.examples.util.DeletingRandomAccessFile class and its import.
  • Added DeletingRandomAccessFile as a private static nested class within CustomPDFDocumentFactory to keep temp-file lifecycle logic co-located with the factory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/common/src/main/java/stirling/software/common/service/CustomPDFDocumentFactory.java Removes the external import and inlines DeletingRandomAccessFile as a private nested implementation used by the factory.
app/common/src/main/java/org/apache/pdfbox/examples/util/DeletingRandomAccessFile.java Deletes the now-unneeded standalone utility class previously living under an org.apache.pdfbox.examples.* path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines ignoring generated files. and removed size:M This PR changes 30-99 lines ignoring generated files. labels Aug 12, 2026
@Frooodle
Frooodle added this pull request to the merge queue Aug 13, 2026
Merged via the queue into Stirling-Tools:main with commit cd49daf Aug 13, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API-related issues or pull requests Java Pull requests that update Java code refactor Code changes that neither fix a bug nor add a feature size:S This PR changes 10-29 lines ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants