jetty.project
jetty.project copied to clipboard
Jetty 12: review `resolve()` and `getPath()` contracts in `ResourceCollection` and `MemoryResource`
Jetty version(s) 12
Description
Review how resolve() and getPath() are supposed to behave when directory and non-directory resources are part of a ResourceCollection, and for MemoryResource in general. Or if we want those Resource implementations at all.
My personal opinion is that neither resolve() nor getPath() should ever return null, but I'm open to different opinions.
If we could arrange for getPath() to never return null, then we would not need the resource class and could just use Path. However, that fails on the ResourceCollection issue that we are required to provide aggregate base resources and to do so without necessarily extracting.
However, we could have that a non-directory resource would always return a path.
Having resolve never return null is doable, but it may be that we would need to return an empty or bad resource from some resolves (or /dev/null if we must have a path).
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to it having no activity.