Skip to content

Sort.descending and Sort.ascending lose null handling and case-sensitivity flags #2585

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

Closed
jansu76 opened this issue Mar 25, 2022 · 0 comments
Assignees
Labels
type: bug A general bug

Comments

@jansu76
Copy link

jansu76 commented Mar 25, 2022

I was puzzled for a while when I used Sort.descending(). Javadoc says

Returns a new {@link Sort} with the current setup but descending order direction.

I had set ignoreCase to true on Order but switching to descending sorting negated that change. I understood "with the current setup" to keep ignoreCase setting as is.

https://stackoverflow.com/questions/71485388/why-does-spring-datas-sort-descending-reset-ignorecase

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 25, 2022
@mp911de mp911de self-assigned this Mar 25, 2022
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 25, 2022
@mp911de mp911de added this to the 2.5.11 (2021.0.11) milestone Mar 25, 2022
@mp911de mp911de changed the title Sort.descending has a side effect of resetting ignoreCase, contrary to javadoc `Sort.descending has a side effect of resetting ignoreCase, contrary to javadoc Mar 25, 2022
@mp911de mp911de changed the title `Sort.descending has a side effect of resetting ignoreCase, contrary to javadoc Sort.descending and Sort.ascending loses null handling and case-sensitivity flags Mar 25, 2022
@mp911de mp911de changed the title Sort.descending and Sort.ascending loses null handling and case-sensitivity flags Sort.descending and Sort.ascending lose null handling and case-sensitivity flags Mar 25, 2022
mp911de added a commit that referenced this issue Mar 25, 2022
Tweak Javadoc comments.

See #2585
mp911de added a commit that referenced this issue Mar 25, 2022
…ion.

We now retain case-sensitivity and null-handling configuration when changing the entire Sort direction.

Closes #2585
mp911de added a commit that referenced this issue Mar 25, 2022
Tweak Javadoc comments.

See #2585
mp911de added a commit that referenced this issue Mar 25, 2022
…ion.

We now retain case-sensitivity and null-handling configuration when changing the entire Sort direction.

Closes #2585
mp911de added a commit that referenced this issue Mar 25, 2022
Tweak Javadoc comments.

See #2585
mp911de added a commit that referenced this issue Mar 25, 2022
…ion.

We now retain case-sensitivity and null-handling configuration when changing the entire Sort direction.

Closes #2585
mp911de added a commit that referenced this issue Mar 25, 2022
Tweak Javadoc comments.

See #2585
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants