-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Introduce getAbsolutePath() in ClassPathResource #29094
Copy link
Copy link
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertheme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: enhancementA general enhancementA general enhancement
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertheme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: enhancementA general enhancementA general enhancement
Type
Fields
Give feedbackNo fields configured for issues without a type.
The Javadoc for the
getPath()method inClassPathResourcestates the following.However, that is not always true since that implies the returned path is an absolute path within the class path.
If the
ClassPathResourcewas created using theClassPathResource(String, Class)constructor with a relative path, the returned path is actually a cleaned version of the relative path supplied to the constructor.In light of that, we should update the Javadoc for
getPath()to reflect the actual semantics and introduce a newgetAbsolutePath()method for retrieving the absolute path.The latter is required by the newly introduced
ResourceHints.registerResourceIfNecessary(Resource)method (see #29083).