mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Upgrade hibernate and fix tests
CORDA-1947 Address code review changes CORDA-1947 Address code review changes
This commit is contained in:
committed by
tudor.malene@gmail.com
parent
7902d758bd
commit
ab98c03d1a
@ -480,7 +480,8 @@ class NodeVaultService(
|
||||
// Even if we set the default pageNumber to be 1 instead, that may not cover the non-default cases.
|
||||
// So the floor may be necessary anyway.
|
||||
query.firstResult = maxOf(0, (paging.pageNumber - 1) * paging.pageSize)
|
||||
query.maxResults = paging.pageSize + 1 // detection too many results
|
||||
val pageSize = paging.pageSize + 1
|
||||
query.maxResults = if (pageSize > 0) pageSize else Integer.MAX_VALUE // detection too many results, protected against overflow
|
||||
|
||||
// execution
|
||||
val results = query.resultList
|
||||
|
Reference in New Issue
Block a user