Summary
This PR refactors the addResourcePathToPackagePath
method by replacing the hardcoded path separator "/"
with the PATH_SEPARATOR
constant. The change enhances code maintainability and readability by avoiding magic literals.
Key Changes
- Introduced
PATH_SEPARATOR
constant in place of the hardcoded'/'
. - Updated the logic to handle the path separator dynamically using the constant.
Why this change is necessary
Using constants improves the consistency of the codebase and makes future modifications easier. If the path separator ever needs to change (e.g., for cross-platform support), we can modify the constant in one place without affecting multiple lines of code.
Impact
- Improves code readability and maintainability.
- Prepares the code for potential cross-platform adjustments in the future.
Please review and provide feedback!