mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
# Description of Changes - Standardized all locale-sensitive operations to use `Locale.ROOT`: - Replaced `toLowerCase()/toUpperCase()` and `String.format(...)` with `Locale.ROOT` variants across services, controllers, utils, and tests (e.g., `InstallationPathConfig`, `ApplicationProperties`, `ResourceMonitor`, `ChecksumUtils`, `PdfUtils`, `UploadLimitService`). - Hardened comparisons and parsing: - Normalized host/domain and file-extension checks with `toLowerCase(Locale.ROOT)`; switched several `equals` calls to constant-first style (e.g., content types, security domain checks). - Logging & formatting improvements: - Ensured percent/size values and hex formatting use root-locale formatting to avoid locale-dependent output. - Code quality & readability: - Converted multiple if/else ladders to modern `switch` expressions. - Minor refactors (method references, early returns), removed redundant returns, and clarified log messages. - Minor fixes/behavioral nits: - Normalized printer selection by lowercasing the searched name once; made some equality checks null-safe/constant-first; added missing `@Override` annotations where appropriate. ## Why - Consistent use of `Locale.ROOT` avoids surprises in different user/system locales (e.g., Turkish-I issues), makes string comparisons deterministic, and keeps numeric/hex formatting stable across environments. --- ## 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/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] 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/devGuide/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/devGuide/DeveloperGuide.md#6-testing) for more details. --------- Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Co-authored-by: James Brunton <jbrunton96@gmail.com> |
||
|---|---|---|
| .. | ||
| common | ||
| core | ||
| proprietary | ||
| allowed-licenses.json | ||