diff --git a/application/src/main/java/net/corda/v5/application/persistence/ParameterizedQuery.java b/application/src/main/java/net/corda/v5/application/persistence/ParameterizedQuery.java index 4eff6c474c..4b511b16e0 100644 --- a/application/src/main/java/net/corda/v5/application/persistence/ParameterizedQuery.java +++ b/application/src/main/java/net/corda/v5/application/persistence/ParameterizedQuery.java @@ -1,6 +1,7 @@ package net.corda.v5.application.persistence; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.Map; @@ -54,7 +55,7 @@ public interface ParameterizedQuery extends PagedQuery { * @return the same {@link ParameterizedQuery} instance. */ @NotNull - ParameterizedQuery setParameter(@NotNull String name, @NotNull Object value); + ParameterizedQuery setParameter(@NotNull String name, @Nullable Object value); /** * Sets the parameters as a {@link Map}. diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/persistence/FindWithNamedQuery.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/persistence/FindWithNamedQuery.avsc index 339a9c73c0..a7c3d440af 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/persistence/FindWithNamedQuery.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/persistence/FindWithNamedQuery.avsc @@ -13,7 +13,7 @@ "name": "parameters", "type": { "type": "map", - "values": "bytes" + "values": ["null", "bytes"] }, "doc": "Parameters for the query, with each value represented as a bytes array payload serialized in AMQP format. Null values must be tested using IS NULL in the query; it is not possible to pass in a null as a parameter value. " }, diff --git a/gradle.properties b/gradle.properties index d961b91108..ff3f0c1f1f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ cordaProductVersion = 5.2.0 # NOTE: update this each time this module contains a breaking change ## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to ## a per module property in which case module versions can change independently. -cordaApiRevision = 21 +cordaApiRevision = 22 # Main kotlin.stdlib.default.dependency = false diff --git a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/query/VaultNamedParameterizedQuery.java b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/query/VaultNamedParameterizedQuery.java index eb44784857..cd1bc0ebe3 100644 --- a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/query/VaultNamedParameterizedQuery.java +++ b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/query/VaultNamedParameterizedQuery.java @@ -7,6 +7,7 @@ import net.corda.v5.ledger.utxo.StateAndRef; import net.corda.v5.ledger.utxo.UtxoLedgerService; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.time.Instant; import java.util.Map; @@ -45,7 +46,7 @@ public interface VaultNamedParameterizedQuery extends ParameterizedQuery { */ @Override @NotNull - VaultNamedParameterizedQuery setParameter(@NotNull String name, @NotNull Object value); + VaultNamedParameterizedQuery setParameter(@NotNull String name, @Nullable Object value); /** * @see ParameterizedQuery#setParameters(Map)