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

KeysetScrollPosition.of(Collections.emptyMap(), Direction.BACKWARD) retain incorrect direction #2840

Closed
quaff opened this issue Jun 6, 2023 · 1 comment
Assignees
Labels
type: bug A general bug

Comments

@quaff
Copy link
Contributor

quaff commented Jun 6, 2023

static KeysetScrollPosition of(Map<String, ?> keys, Direction direction) {
Assert.notNull(keys, "Keys must not be null");
Assert.notNull(direction, "Direction must not be null");
return keys.isEmpty()
? initial()
: new KeysetScrollPosition(Collections.unmodifiableMap(new LinkedHashMap<>(keys)), direction);
}

Parameter direction should not be ignored if keys is empty.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 6, 2023
@quaff quaff changed the title KeysetScrollPosition.of(Collections.emptyMap(), Direction.BACKWARD) return incorrect direction KeysetScrollPosition.of(Collections.emptyMap(), Direction.BACKWARD) retain incorrect direction Jun 6, 2023
quaff added a commit to quaff/spring-data-commons that referenced this issue Jun 6, 2023
After this commit, KeysetScrollPosition.of(Collections.emptyMap(), Direction.BACKWARD) will retain correct direction

Closes spring-projectsGH-2840
@quaff
Copy link
Contributor Author

quaff commented Jun 16, 2023

Superseded by #2841

@quaff quaff closed this as completed Jun 16, 2023
@mp911de mp911de reopened this Jul 4, 2023
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 4, 2023
@mp911de mp911de added this to the 3.1.2 (2023.0.2) milestone Jul 4, 2023
@mp911de mp911de self-assigned this Jul 4, 2023
mp911de added a commit that referenced this issue Jul 4, 2023
We now retain the direction when an empty KeysetScrollPosition is created.

Closes #2840
@mp911de mp911de closed this as completed in 3df0c3b Jul 4, 2023
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

Successfully merging a pull request may close this issue.

3 participants