Skip to content
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

PathMatchingResourcePatternResolver should enforce OS-independent sorting of directory content [SPR-16838] #21378

Closed
spring-projects-issues opened this issue May 18, 2018 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented May 18, 2018

Benoit opened SPR-16838 and commented

A sort was added in #18657 but the default File#compareTo depends upon the underlying system.

The ordering of the ressources returned by PathMatchingResourcePatternResolver#retrieveMatchingFiles may differ between OS (Windows, Unix).

This leads to subtle bugs hard to track.

 This PR replace the default sort with one based on the file name.


Affects: 5.0.6

Issue Links:

Referenced from: pull request #1832, and commits bb6ab5d

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Resolved in a more extensive fashion through a listDirectory template method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants