Stirling-PDF
Stirling-PDF copied to clipboard
Refactor Path Handling
Description of Changes
Please provide a summary of the changes, including:
What was changed:
- Refactored path constructions in multiple classes (e.g., SPDFApplication.java, InstallationPathConfig.java, RuntimePathConfig.java) to use Java NIOβs Paths.get() and Path.of() instead of manual string concatenation.
Why the change was made:
- To improve code readability, maintainability, and robustness by leveraging modern Java NIO utilities.
- To ensure better portability across different operating systems by avoiding hardcoded file separators.
Challenges encountered:
- Maintaining backward compatibility while transitioning from manual string concatenation to using Paths for file path construction.
- Ensuring that the refactored path resolution works consistently across all supported environments (Windows, macOS, Linux, and Docker).
@Frooodle can you check the docker path /.dockerenv?
Checklist
General
- [x] I have read the Contribution Guidelines
- [x] I have read the Stirling-PDF Developer Guide (if applicable)
- [x] I have read the How to add new languages to Stirling-PDF (if applicable)
- [x] I have performed a self-review of my own code
- [ ] My changes generate no new warnings
Documentation
- [ ] I have updated relevant docs on Stirling-PDF's doc repo (if functionality has heavily changed)
- [ ] I have read the section Add New Translation Tags (for new translation tags only)
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 tested my changes locally. Refer to the Testing Guide for more details.
/deploypr
π PR Test Deployment
Your PR has been deployed for testing!
π Test URL: http://185.252.234.121:3041
This deployment will be automatically cleaned up when the PR is closed.
/deploypr
π PR Test Deployment
Your PR has been deployed for testing!
π Test URL: http://185.252.234.121:3041
This deployment will be automatically cleaned up when the PR is closed.