-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #8474 - Jetty 12 - Resource.list()
API change + Resource.getFileName()
addition
#8582
Conversation
* Introduce Resource.getFileName and use it * Correct signature of Resource.list and use it Signed-off-by: Joakim Erdfelt <[email protected]>
72100c4
to
237f2f4
Compare
Resource.list()
API changeResource.list()
API change + Resource.getFileName()
addition
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceListing.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceListing.java
Show resolved
Hide resolved
jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/resource/ResourceCollators.java
Show resolved
Hide resolved
jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/resource/ResourceCollection.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/FileID.java
Outdated
Show resolved
Hide resolved
...ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/MetaInfConfiguration.java
Outdated
Show resolved
Hide resolved
...ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/MetaInfConfiguration.java
Outdated
Show resolved
Hide resolved
jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebAppContext.java
Outdated
Show resolved
Hide resolved
jetty-ee9/jetty-ee9-webapp/src/main/java/org/eclipse/jetty/ee9/webapp/MetaInfConfiguration.java
Outdated
Show resolved
Hide resolved
jetty-ee9/jetty-ee9-webapp/src/main/java/org/eclipse/jetty/ee9/webapp/WebAppContext.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart the 3 nits, but please fix them..
return r.getURI().toURL(); | ||
} | ||
|
||
// Resource was returned, but none-existed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You meant non-existent
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
|
||
return resource.getURI().toURL(); | ||
// Resource was returned, but none-existed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You meant non-existent
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
|
||
return resource.getURI().toURL(); | ||
// Resource was returned, but none-existed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You meant non-existent
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Per discussion around Issue #8474, the API of
Resource.list()
has changed.List<String>
toList<Resource>
New API
Resource.getFileName()
has been implemented to make users of the above API easier to implement.When it comes to uniqueness of the entries in the list, that's only relevant for the
ResourceListing
class.All other callers don't need (or want) the uniqueness behaviors.
The uniqueness algorithm in
ResourceListing
for this PR is "first hit".Other algorithms suggested (eg: "most recently updated" / "largest entry" / "last hit" / etc) are not implemented in this PR.