Stirling-PDF/src/main/java/stirling/software/SPDF/config
Ludy 2ab951e080
Improve Type-Safe Casting with Pattern Matching (#2990)
# Description of Changes

Please provide a summary of the changes, including:

This PR refactors multiple instances of type casting throughout the
codebase by replacing them with Java's pattern matching for
`instanceof`. This approach eliminates redundant type casting, improves
code readability, and reduces the chances of `ClassCastException`. The
changes primarily affect authentication handling, PDF processing, and
certificate validation.

### Key Changes:
- Replaced traditional `instanceof` checks followed by explicit casting
with pattern matching.
- Improved readability and maintainability of type-related operations.
- Applied changes across security modules, PDF utilities, and image
processing functions.

This refactor does not introduce new functionality but enhances the
robustness and clarity of the existing code.

pending until #2818 is published

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/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/HowToAddNewLanguage.md)
(if applicable)
- [ ] 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:50 +00:00
..
fingerprint Frooodle/license (#1994) 2024-10-14 22:34:41 +01:00
interfaces SSO Refactoring (#2818) 2025-02-24 22:18:34 +00:00
security Improve Type-Safe Casting with Pattern Matching (#2990) 2025-02-25 21:31:50 +00:00
AppConfig.java SSO Refactoring (#2818) 2025-02-24 22:18:34 +00:00
AppUpdateService.java Enhance AppUpdateService: Add @Configuration Annotation for Improved Spring Boot Integration (#3036) 2025-02-23 20:02:46 +00:00
CleanUrlInterceptor.java SSO Refactoring (#2818) 2025-02-24 22:18:34 +00:00
ConfigInitializer.java Config rework (#2823) 2025-01-31 11:00:03 +00:00
EndpointConfiguration.java Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
EndpointInterceptor.java formattingand autowired constructors (#2557) 2024-12-24 09:52:53 +00:00
ExternalAppDepConfig.java Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
FileFallbackTemplateResolver.java File paths dynamic (#2605) 2025-01-06 12:41:30 +00:00
InitialSetup.java Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
InstallationPathConfig.java Refactor Path Handling (#3041) 2025-02-25 21:31:20 +00:00
LocaleConfiguration.java formattingand autowired constructors (#2557) 2024-12-24 09:52:53 +00:00
LogbackPropertyLoader.java File paths dynamic (#2605) 2025-01-06 12:41:30 +00:00
MetricsConfig.java eol 2024-01-03 17:59:04 +00:00
MetricsFilter.java Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
OpenApiConfig.java formattingand autowired constructors (#2557) 2024-12-24 09:52:53 +00:00
PostHogConfig.java Dynamic paths for tools and removal of unused book endpoints (#3018) 2025-02-23 13:36:21 +00:00
PostHogLoggerImpl.java Posthog to log to log file (#2813) 2025-01-30 15:13:42 +00:00
RuntimePathConfig.java Refactor Path Handling (#3041) 2025-02-25 21:31:20 +00:00
StartupApplicationListener.java eol 2024-01-03 17:59:04 +00:00
WebMvcConfig.java File paths dynamic (#2605) 2025-01-06 12:41:30 +00:00
YamlPropertySourceFactory.java File paths dynamic (#2605) 2025-01-06 12:41:30 +00:00