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

org.springframework.data.domain.PageImpl's toString [DATACMNS-1640] #2066

Open
spring-projects-issues opened this issue Dec 20, 2019 · 0 comments · May be fixed by #2320
Open

org.springframework.data.domain.PageImpl's toString [DATACMNS-1640] #2066

spring-projects-issues opened this issue Dec 20, 2019 · 0 comments · May be fixed by #2320
Assignees
Labels
for: team-attention An issue we need to discuss as a team to make progress in: core Issues in core support type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Patrik Mihalcin opened DATACMNS-1640 and commented

toString implementation of PageImpl class doesn't include content.

Given I have this test written in Groovy:

import static java.util.Arrays.asList

import org.junit.Test
import org.springframework.data.domain.PageImpl
import org.springframework.data.domain.PageRequest

class PageTest {

@Test
void "different content, toString representation doesn't indicate it"() {
    Page<String> page1 = new PageImpl<>(asList("item1", "item2"), new PageRequest(0, 5), 10)
    Page<String> page2 = new PageImpl<>(asList("item1", "item3"), new PageRequest(0, 5), 10)
    assert page1 == page2
}
}

The error is reported as follows:

Assertion failed: 

assert page1 == page2
       |     |  |
       |     |  Page 1 of 2 containing java.lang.String instances
       |     false
       Page 1 of 2 containing java.lang.String instances

The same toString representation for different pages


No further details from DATACMNS-1640

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core support labels Dec 30, 2020
@mp911de mp911de assigned mp911de and unassigned odrotbohm Mar 15, 2021
@mp911de mp911de added the for: team-attention An issue we need to discuss as a team to make progress label Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: team-attention An issue we need to discuss as a team to make progress in: core Issues in core support type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants