mirror of
https://github.com/corda/corda.git
synced 2024-12-27 00:21:12 +00:00
Merge pull request #3189 from corda/cherrypick-corda-1397
CORDA-1397 - Fixed incorrect exception handling in `NodeVaultService…
This commit is contained in:
commit
35246460e2
@ -7,6 +7,10 @@ release, see :doc:`upgrade-notes`.
|
|||||||
Unreleased
|
Unreleased
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
* Fixed incorrect exception handling in ``NodeVaultService._query()``.
|
||||||
|
|
||||||
|
* Avoided a memory leak deriving from incorrect MappedSchema caching strategy.
|
||||||
|
|
||||||
* Fix CORDA-1403 where a property of a class that implemented a generic interface could not be deserialised in
|
* Fix CORDA-1403 where a property of a class that implemented a generic interface could not be deserialised in
|
||||||
a factory without a serialiser as the subtype check for the class instance failed. Fix is to compare the raw
|
a factory without a serialiser as the subtype check for the class instance failed. Fix is to compare the raw
|
||||||
type.
|
type.
|
||||||
|
@ -396,7 +396,6 @@ class NodeVaultService(
|
|||||||
// TODO: revisit (use single instance of parser for all queries)
|
// TODO: revisit (use single instance of parser for all queries)
|
||||||
val criteriaParser = HibernateQueryCriteriaParser(contractStateType, contractStateTypeMappings, criteriaBuilder, criteriaQuery, queryRootVaultStates)
|
val criteriaParser = HibernateQueryCriteriaParser(contractStateType, contractStateTypeMappings, criteriaBuilder, criteriaQuery, queryRootVaultStates)
|
||||||
|
|
||||||
try {
|
|
||||||
// parse criteria and build where predicates
|
// parse criteria and build where predicates
|
||||||
criteriaParser.parse(criteria, sorting)
|
criteriaParser.parse(criteria, sorting)
|
||||||
|
|
||||||
@ -451,10 +450,6 @@ class NodeVaultService(
|
|||||||
statesAndRefs.addAll(servicesForResolution.loadStates(stateRefs) as Collection<StateAndRef<T>>)
|
statesAndRefs.addAll(servicesForResolution.loadStates(stateRefs) as Collection<StateAndRef<T>>)
|
||||||
|
|
||||||
return Vault.Page(states = statesAndRefs, statesMetadata = statesMeta, stateTypes = criteriaParser.stateTypes, totalStatesAvailable = totalStates, otherResults = otherResults)
|
return Vault.Page(states = statesAndRefs, statesMetadata = statesMeta, stateTypes = criteriaParser.stateTypes, totalStatesAvailable = totalStates, otherResults = otherResults)
|
||||||
} catch (e: java.lang.Exception) {
|
|
||||||
log.error(e.message)
|
|
||||||
throw e.cause ?: e
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(VaultQueryException::class)
|
@Throws(VaultQueryException::class)
|
||||||
|
Loading…
Reference in New Issue
Block a user