[CORDA-860]: Retrieving state by recordTime.max() throws a cast exception (fixed) (#3090)

This commit is contained in:
Michele Sollecito
2018-05-08 19:16:19 +07:00
committed by GitHub
parent 173d0f2ada
commit 5318c395ee
4 changed files with 39 additions and 4 deletions

View File

@ -395,7 +395,7 @@ class NodeVaultService(
val count = builder { VaultSchemaV1.VaultStates::recordedTime.count() }
val countCriteria = QueryCriteria.VaultCustomQueryCriteria(count, Vault.StateStatus.ALL)
val results = queryBy(contractStateType, criteria.and(countCriteria))
totalStates = results.otherResults[0] as Long
totalStates = results.otherResults.last() as Long
}
val session = getSession()