codeconsole commented on PR #16323:
URL: https://github.com/apache/grails-core/pull/16323#issuecomment-5628756457
All four addressed in `8f497f5`.
**1. JSON API truncation** — real miss, thanks. Fixed as you suggested, plus
an `IterableRenderSpec` case rendering with `total: 3_000_000_000L` that
asserts the `last` offset. Confirmed it fails with the old `(Integer)` cast and
passes with `longValue()`.
**2. `PaginationSpec`** — declarations now `Long`, with rows past
`Integer.MAX_VALUE` including your `getLastOffset(3_000_000_000L, 10) ==
2_999_999_990L`. One row I added was wrong and the suite caught it:
`getNextOffset` returns `null` on the last page, so it's now a penultimate-page
row that advances past 2³¹ plus a `null` row.
**3. `offset`** — widened to `Long`. That needed `Parameters.long()` instead
of `int()` in `DefaultHalViewHelper`, or the request path would have capped at
2³¹ regardless.
**4. Upgrade note** — wording corrected; JSON view `model { }` and the
`paginate()`/`links()` signature change both noted.
One precision on your last point: widening holds for *arguments*, so callers
are indeed fine, but the reverse — a `Long` result assigned into an `Integer`
variable — is a compile error under STC, which is the migration this PR exists
to force. The note says that in the `count()` section; I kept the pagination
paragraph to callers-unaffected so the two don't read as contradicting.
Verified: full `compileGroovy compileTestGroovy`, `grails-views-gson` /
`grails-datamapping-core` / `grails-data-graphql-core` tests, and
`views-functional-tests:integrationTest --rerun-tasks`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]