Expose Path getters on ApplicationHome and ApplicationTemp#50194
Open
zxuhan wants to merge 2 commits intospring-projects:mainfrom
Open
Expose Path getters on ApplicationHome and ApplicationTemp#50194zxuhan wants to merge 2 commits intospring-projects:mainfrom
zxuhan wants to merge 2 commits intospring-projects:mainfrom
Conversation
Closes spring-projectsgh-50192 Signed-off-by: zxuhan7 <zxuhan7@gmail.com>
philwebb
reviewed
Apr 24, 2026
Member
philwebb
left a comment
There was a problem hiding this comment.
Thanks for the PR. I've added some comments for review. Are you also interested in updating the PR to add similar code to ApplicationHome?
| /** | ||
| * Return the path to be used for application specific temp files. | ||
| * @return the application temp path | ||
| * @since 4.1.0 |
Member
There was a problem hiding this comment.
This won't make 4.1.0 because we're already at RC. We can consider it for 4.2.0.
| * @return the subdirectory path | ||
| * @since 4.1.0 | ||
| */ | ||
| public Path getPath(String subDir) { |
Member
There was a problem hiding this comment.
I don't think we should add this. The user can do temp.path().resolve(...) directly.
- Update @SInCE to 4.2.0 on ApplicationTemp.getPath() - Remove getPath(String subDir) per review - Add getPath() and getSourcePath() to ApplicationHome See spring-projectsgh-50192 Signed-off-by: zxuhan7 <zxuhan7@gmail.com>
Contributor
Author
|
Thanks for the review! Updated:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ApplicationTempalready usesjava.nio.file.Pathinternally but only exposesjava.io.FileviagetDir()/getDir(String). Callers that want to use the NIOFilesAPI have to round-trip throughgetDir().toPath().This change makes
getPath()public and addsgetPath(String subDir)to mirror the existinggetDirmethods.Closes gh-50192