You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void "Broken Empty Page When Mapped"() {
when:
Page<String> page = Page.empty()
def copy = page.map { it -> it }
copy.getTotalSize()
then:
thrown(java.lang.IllegalStateException.class)
}
Caused by: java.lang.IllegalStateException: Page does not contain total count. It is likely that the Pageable needs to be modified to request this information.
Steps To Reproduce
test code provided above
Environment Information
any
Example Application
No response
Version
Micronaut Data 4.9.4
The text was updated successfully, but these errors were encountered:
Expected Behavior
an empty page should still be mappable.
Actual Behaviour
It seems like some toes were dipped in the water around this issue
https://github.com/micronaut-projects/micronaut-data/pull/3142/files
but I'm guessing there's some additional context as to why it's set to null rather than 0.
micronaut-data/data-model/src/main/java/io/micronaut/data/model/Page.java
Line 100 in 833e04b
Steps To Reproduce
test code provided above
Environment Information
any
Example Application
No response
Version
Micronaut Data 4.9.4
The text was updated successfully, but these errors were encountered: