Stirling-PDF/src/main/java/stirling/software/SPDF
Ludy a1f7bb3e4a
Refactor Path Handling (#3041)
# 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](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [x] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(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](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#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](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-02-25 21:31:20 +00:00
..
config Refactor Path Handling (#3041) 2025-02-25 21:31:20 +00:00
controller Refactor Path Handling (#3041) 2025-02-25 21:31:20 +00:00
EE SSO Refactoring (#2818) 2025-02-24 22:18:34 +00:00
Factories commit for feature developing invert-replace color of a pdf for stirl… (#1982) 2024-10-04 16:53:00 +01:00
model SSO Refactoring (#2818) 2025-02-24 22:18:34 +00:00
pdf Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
repository formattingand autowired constructors (#2557) 2024-12-24 09:52:53 +00:00
service Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
UI Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
utils Refactor Path Handling (#3041) 2025-02-25 21:31:20 +00:00
LibreOfficeListener.java formattingand autowired constructors (#2557) 2024-12-24 09:52:53 +00:00
SPDFApplication.java Refactor Path Handling (#3041) 2025-02-25 21:31:20 +00:00