From 3e4a5976d88bd5b815041353ee98d732a520b117 Mon Sep 17 00:00:00 2001 From: Jonathan Locke <36930160+lockathan@users.noreply.github.com> Date: Tue, 26 Mar 2019 11:14:06 +0000 Subject: [PATCH] Revert "CORDA-2782 Add Comparable to default whitelist for vault query criteria using comparables (#4920)" This reverts commit 12e78973165682d41f2e07314f944e87a134f193. --- .../net/corda/kotlin/rpc/StandaloneCordaRPClientTest.kt | 8 -------- .../net/corda/serialization/internal/DefaultWhitelist.kt | 4 +--- .../net/corda/serialization/internal/DefaultWhitelist.kt | 5 +---- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/client/rpc/src/smoke-test/kotlin/net/corda/kotlin/rpc/StandaloneCordaRPClientTest.kt b/client/rpc/src/smoke-test/kotlin/net/corda/kotlin/rpc/StandaloneCordaRPClientTest.kt index 62dd1c5afc..7cd3d6ac46 100644 --- a/client/rpc/src/smoke-test/kotlin/net/corda/kotlin/rpc/StandaloneCordaRPClientTest.kt +++ b/client/rpc/src/smoke-test/kotlin/net/corda/kotlin/rpc/StandaloneCordaRPClientTest.kt @@ -25,7 +25,6 @@ import net.corda.finance.workflows.getCashBalance import net.corda.finance.workflows.getCashBalances import net.corda.finance.flows.CashIssueFlow import net.corda.finance.flows.CashPaymentFlow -import net.corda.finance.schemas.CashSchemaV1 import net.corda.java.rpc.StandaloneCordaRPCJavaClientTest import net.corda.nodeapi.internal.config.User import net.corda.smoketesting.NodeConfig @@ -219,13 +218,6 @@ class StandaloneCordaRPClientTest { log.info("Cash Balances: $cashBalances") assertEquals(1, cashBalances.size) assertEquals(629.POUNDS, cashBalances[Currency.getInstance("GBP")]) - - // Check for cash states using a query criteria comparator - val logicalExpression = builder { CashSchemaV1.PersistentCashState::pennies.greaterThan(10000L) } - val customCriteria = QueryCriteria.VaultCustomQueryCriteria(logicalExpression) - val customCriteriaResults = rpcProxy.vaultQueryBy(customCriteria) - assertEquals(1, customCriteriaResults.states.size) - assertEquals(customCriteriaResults.states.first().state.data.amount.quantity, 529.POUNDS.quantity) } @Test diff --git a/serialization-deterministic/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt b/serialization-deterministic/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt index c41625084b..b1435f6c2f 100644 --- a/serialization-deterministic/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt +++ b/serialization-deterministic/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt @@ -6,7 +6,5 @@ import net.corda.core.serialization.SerializationWhitelist * The DJVM does not need whitelisting, by definition. */ object DefaultWhitelist : SerializationWhitelist { - override val whitelist = listOf( - java.lang.Comparable::class.java // required for forwards compatibility with default whitelist - ) + override val whitelist: List> get() = emptyList() } diff --git a/serialization/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt b/serialization/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt index 7936982be3..1f4db775c4 100644 --- a/serialization/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt +++ b/serialization/src/main/kotlin/net/corda/serialization/internal/DefaultWhitelist.kt @@ -63,9 +63,6 @@ object DefaultWhitelist : SerializationWhitelist { // Implementation of X509Certificate. X509CertImpl::class.java, - CRLReason::class.java, - - // used in Vault Query criteria comparators (see QueryCriteriaUtils.Builder) - java.lang.Comparable::class.java + CRLReason::class.java ) }