mirror of
https://github.com/corda/corda.git
synced 2024-12-19 21:17:58 +00:00
Merge branch 'release/os/4.6' into cc/merge/os-4.6-os-4.7/24-apr-2023
Fwd-merge from OS 4.6.
This commit is contained in:
commit
91c38fa84b
13
build.gradle
13
build.gradle
@ -61,8 +61,9 @@ buildscript {
|
|||||||
|
|
||||||
ext.asm_version = '7.1'
|
ext.asm_version = '7.1'
|
||||||
ext.artemis_version = '2.6.2'
|
ext.artemis_version = '2.6.2'
|
||||||
// TODO Upgrade Jackson only when corda is using kotlin 1.3.10
|
// TODO Upgrade to Jackson Kotlin 2.10+ only when corda is using kotlin 1.3.10
|
||||||
ext.jackson_version = '2.9.7'
|
ext.jackson_version = '2.13.5'
|
||||||
|
ext.jackson_kotlin_version = '2.9.7'
|
||||||
ext.jetty_version = '9.4.19.v20190610'
|
ext.jetty_version = '9.4.19.v20190610'
|
||||||
ext.jersey_version = '2.25'
|
ext.jersey_version = '2.25'
|
||||||
ext.servlet_version = '4.0.1'
|
ext.servlet_version = '4.0.1'
|
||||||
@ -105,9 +106,9 @@ buildscript {
|
|||||||
ext.dependency_checker_version = '5.2.0'
|
ext.dependency_checker_version = '5.2.0'
|
||||||
ext.commons_collections_version = '4.3'
|
ext.commons_collections_version = '4.3'
|
||||||
ext.beanutils_version = '1.9.4'
|
ext.beanutils_version = '1.9.4'
|
||||||
ext.crash_version = '1.7.4'
|
ext.crash_version = '1.7.6'
|
||||||
ext.jsr305_version = constants.getProperty("jsr305Version")
|
ext.jsr305_version = constants.getProperty("jsr305Version")
|
||||||
ext.shiro_version = '1.4.1'
|
ext.shiro_version = '1.10.0'
|
||||||
ext.artifactory_plugin_version = constants.getProperty('artifactoryPluginVersion')
|
ext.artifactory_plugin_version = constants.getProperty('artifactoryPluginVersion')
|
||||||
ext.hikari_version = '3.3.1'
|
ext.hikari_version = '3.3.1'
|
||||||
ext.liquibase_version = '3.6.3'
|
ext.liquibase_version = '3.6.3'
|
||||||
@ -446,6 +447,10 @@ allprojects {
|
|||||||
details.useVersion netty_version
|
details.useVersion netty_version
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (details.requested.group == 'org.yaml' && details.requested.name == 'snakeyaml') {
|
||||||
|
details.useVersion snake_yaml_version
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,9 @@ dependencies {
|
|||||||
|
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
// Jackson and its plugins: parsing to/from JSON and other textual formats.
|
// Jackson and its plugins: parsing to/from JSON and other textual formats.
|
||||||
compile "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
|
compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_kotlin_version") {
|
||||||
|
exclude module: "jackson-databind"
|
||||||
|
}
|
||||||
// Yaml is useful for parsing strings to method calls.
|
// Yaml is useful for parsing strings to method calls.
|
||||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
|
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
|
||||||
// This adds support for java.time types.
|
// This adds support for java.time types.
|
||||||
|
@ -6,6 +6,7 @@ import com.fasterxml.jackson.core.*
|
|||||||
import com.fasterxml.jackson.databind.*
|
import com.fasterxml.jackson.databind.*
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||||
|
import com.fasterxml.jackson.databind.cfg.ConstructorDetector
|
||||||
import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
|
import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
|
||||||
import com.fasterxml.jackson.databind.deser.std.NumberDeserializers
|
import com.fasterxml.jackson.databind.deser.std.NumberDeserializers
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode
|
import com.fasterxml.jackson.databind.node.ObjectNode
|
||||||
@ -179,6 +180,8 @@ object JacksonSupport {
|
|||||||
addMixIn(X500Principal::class.java, X500PrincipalMixin::class.java)
|
addMixIn(X500Principal::class.java, X500PrincipalMixin::class.java)
|
||||||
addMixIn(X509Certificate::class.java, X509CertificateMixin::class.java)
|
addMixIn(X509Certificate::class.java, X509CertificateMixin::class.java)
|
||||||
addMixIn(CertPath::class.java, CertPathMixin::class.java)
|
addMixIn(CertPath::class.java, CertPathMixin::class.java)
|
||||||
|
|
||||||
|
setConstructorDetector(ConstructorDetector.DEFAULT.withAllowJDKTypeConstructors(true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
|
|||||||
import com.fasterxml.jackson.databind.deser.ContextualDeserializer
|
import com.fasterxml.jackson.databind.deser.ContextualDeserializer
|
||||||
import com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
|
import com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
|
||||||
import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer
|
import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer
|
||||||
|
import com.fasterxml.jackson.databind.introspect.AccessorNamingStrategy
|
||||||
import com.fasterxml.jackson.databind.introspect.AnnotatedClass
|
import com.fasterxml.jackson.databind.introspect.AnnotatedClass
|
||||||
import com.fasterxml.jackson.databind.introspect.BasicClassIntrospector
|
import com.fasterxml.jackson.databind.introspect.BasicClassIntrospector
|
||||||
import com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector
|
import com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector
|
||||||
@ -117,6 +118,14 @@ private class CordaSerializableClassIntrospector(private val context: Module.Set
|
|||||||
}
|
}
|
||||||
return super.constructPropertyCollector(config, ac, type, forSerialization, mutatorPrefix)
|
return super.constructPropertyCollector(config, ac, type, forSerialization, mutatorPrefix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun constructPropertyCollector(config: MapperConfig<*>?, classDef: AnnotatedClass?, type: JavaType, forSerialization: Boolean, accNaming: AccessorNamingStrategy?): POJOPropertiesCollector {
|
||||||
|
if (hasCordaSerializable(type.rawClass)) {
|
||||||
|
// Adjust the field visibility of CordaSerializable classes on the fly as they are encountered.
|
||||||
|
context.configOverride(type.rawClass).visibility = Value.defaultVisibility().withFieldVisibility(Visibility.ANY)
|
||||||
|
}
|
||||||
|
return super.constructPropertyCollector(config, classDef, type, forSerialization, accNaming)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CordaSerializableBeanSerializerModifier : BeanSerializerModifier() {
|
private class CordaSerializableBeanSerializerModifier : BeanSerializerModifier() {
|
||||||
|
@ -26,7 +26,7 @@ disruptorVersion=3.4.2
|
|||||||
typesafeConfigVersion=1.3.4
|
typesafeConfigVersion=1.3.4
|
||||||
jsr305Version=3.0.2
|
jsr305Version=3.0.2
|
||||||
artifactoryPluginVersion=4.16.1
|
artifactoryPluginVersion=4.16.1
|
||||||
snakeYamlVersion=1.19
|
snakeYamlVersion=1.33
|
||||||
caffeineVersion=2.7.0
|
caffeineVersion=2.7.0
|
||||||
metricsVersion=4.1.0
|
metricsVersion=4.1.0
|
||||||
metricsNewRelicVersion=1.1.1
|
metricsNewRelicVersion=1.1.1
|
||||||
|
@ -8,6 +8,7 @@ import net.corda.core.flows.*
|
|||||||
import net.corda.core.identity.Party
|
import net.corda.core.identity.Party
|
||||||
import net.corda.core.internal.concurrent.transpose
|
import net.corda.core.internal.concurrent.transpose
|
||||||
import net.corda.core.messaging.startFlow
|
import net.corda.core.messaging.startFlow
|
||||||
|
import net.corda.core.node.services.StatesNotAvailableException
|
||||||
import net.corda.core.node.services.queryBy
|
import net.corda.core.node.services.queryBy
|
||||||
import net.corda.core.node.services.vault.QueryCriteria
|
import net.corda.core.node.services.vault.QueryCriteria
|
||||||
import net.corda.core.transactions.TransactionBuilder
|
import net.corda.core.transactions.TransactionBuilder
|
||||||
@ -69,7 +70,11 @@ class ScheduledFlowIntegrationTests {
|
|||||||
val state = results.states.firstOrNull() ?: return
|
val state = results.states.firstOrNull() ?: return
|
||||||
require(!state.state.data.processed) { "Cannot spend an already processed state" }
|
require(!state.state.data.processed) { "Cannot spend an already processed state" }
|
||||||
val lock = UUID.randomUUID()
|
val lock = UUID.randomUUID()
|
||||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
try {
|
||||||
|
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||||
|
} catch (e: StatesNotAvailableException) {
|
||||||
|
return
|
||||||
|
}
|
||||||
val notary = state.state.notary
|
val notary = state.state.notary
|
||||||
val outputState = SpentState(identity, ourIdentity, state.state.data.destination)
|
val outputState = SpentState(identity, ourIdentity, state.state.data.destination)
|
||||||
val builder = TransactionBuilder(notary)
|
val builder = TransactionBuilder(notary)
|
||||||
|
@ -4,6 +4,7 @@ import co.paralleluniverse.fibers.Suspendable
|
|||||||
import net.corda.core.contracts.*
|
import net.corda.core.contracts.*
|
||||||
import net.corda.core.flows.*
|
import net.corda.core.flows.*
|
||||||
import net.corda.core.identity.Party
|
import net.corda.core.identity.Party
|
||||||
|
import net.corda.core.node.services.StatesNotAvailableException
|
||||||
import net.corda.core.transactions.TransactionBuilder
|
import net.corda.core.transactions.TransactionBuilder
|
||||||
import net.corda.core.utilities.NonEmptySet
|
import net.corda.core.utilities.NonEmptySet
|
||||||
import net.corda.testing.contracts.DummyContract
|
import net.corda.testing.contracts.DummyContract
|
||||||
@ -25,7 +26,11 @@ class ScheduledFlow(private val stateRef: StateRef) : FlowLogic<Unit>() {
|
|||||||
}
|
}
|
||||||
require(!scheduledState.processed) { "State should not have been previously processed" }
|
require(!scheduledState.processed) { "State should not have been previously processed" }
|
||||||
val lock = UUID.randomUUID()
|
val lock = UUID.randomUUID()
|
||||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
try {
|
||||||
|
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||||
|
} catch (e: StatesNotAvailableException) {
|
||||||
|
return
|
||||||
|
}
|
||||||
val notary = state.state.notary
|
val notary = state.state.notary
|
||||||
val newStateOutput = scheduledState.copy(processed = true)
|
val newStateOutput = scheduledState.copy(processed = true)
|
||||||
val builder = TransactionBuilder(notary)
|
val builder = TransactionBuilder(notary)
|
||||||
|
@ -574,7 +574,7 @@ class CheckpointDumperImpl(private val checkpointStorage: CheckpointStorage, pri
|
|||||||
|
|
||||||
private object MapSerializer : JsonSerializer<Map<Any, Any>>() {
|
private object MapSerializer : JsonSerializer<Map<Any, Any>>() {
|
||||||
override fun serialize(map: Map<Any, Any>, gen: JsonGenerator, serializers: SerializerProvider) {
|
override fun serialize(map: Map<Any, Any>, gen: JsonGenerator, serializers: SerializerProvider) {
|
||||||
gen.writeStartArray(map.size)
|
gen.writeStartArray()
|
||||||
map.forEach { (key, value) ->
|
map.forEach { (key, value) ->
|
||||||
gen.jsonObject {
|
gen.jsonObject {
|
||||||
writeObjectField("key", key)
|
writeObjectField("key", key)
|
||||||
|
@ -16,7 +16,7 @@ dependencies {
|
|||||||
cordaCompile project(':core')
|
cordaCompile project(':core')
|
||||||
|
|
||||||
|
|
||||||
compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version")
|
compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_kotlin_version")
|
||||||
|
|
||||||
// only included to control the `DemoClock` as part of the demo application
|
// only included to control the `DemoClock` as part of the demo application
|
||||||
// normally `:node` should not be depended on in any CorDapps
|
// normally `:node` should not be depended on in any CorDapps
|
||||||
|
@ -70,7 +70,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
compile('org.springframework.boot:spring-boot-starter-log4j2')
|
compile('org.springframework.boot:spring-boot-starter-log4j2')
|
||||||
runtimeOnly("org.apache.logging.log4j:log4j-web:$log4j_version")
|
runtimeOnly("org.apache.logging.log4j:log4j-web:$log4j_version")
|
||||||
compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version")
|
compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_kotlin_version")
|
||||||
compile project(":client:rpc")
|
compile project(":client:rpc")
|
||||||
compile project(":client:jackson")
|
compile project(":client:jackson")
|
||||||
compile project(":finance:workflows")
|
compile project(":finance:workflows")
|
||||||
|
@ -82,10 +82,10 @@ include 'tools:checkpoint-agent'
|
|||||||
include 'samples:attachment-demo:contracts'
|
include 'samples:attachment-demo:contracts'
|
||||||
include 'samples:attachment-demo:workflows'
|
include 'samples:attachment-demo:workflows'
|
||||||
include 'samples:trader-demo:workflows-trader'
|
include 'samples:trader-demo:workflows-trader'
|
||||||
include 'samples:irs-demo'
|
// include 'samples:irs-demo'
|
||||||
include 'samples:irs-demo:cordapp:contracts-irs'
|
// include 'samples:irs-demo:cordapp:contracts-irs'
|
||||||
include 'samples:irs-demo:cordapp:workflows-irs'
|
// include 'samples:irs-demo:cordapp:workflows-irs'
|
||||||
include 'samples:irs-demo:web'
|
// include 'samples:irs-demo:web'
|
||||||
include 'samples:simm-valuation-demo'
|
include 'samples:simm-valuation-demo'
|
||||||
include 'samples:simm-valuation-demo:flows'
|
include 'samples:simm-valuation-demo:flows'
|
||||||
include 'samples:simm-valuation-demo:contracts-states'
|
include 'samples:simm-valuation-demo:contracts-states'
|
||||||
|
@ -6,7 +6,7 @@ dependencies {
|
|||||||
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
|
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
|
||||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||||
compile "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
|
compile "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_kotlin_version"
|
||||||
|
|
||||||
compile "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}"
|
compile "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}"
|
||||||
compile "junit:junit:${junit_version}"
|
compile "junit:junit:${junit_version}"
|
||||||
|
@ -52,7 +52,7 @@ dependencies {
|
|||||||
compile "com.typesafe:config:$typesafe_config_version"
|
compile "com.typesafe:config:$typesafe_config_version"
|
||||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
|
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
|
||||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||||
compile "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
|
compile "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_kotlin_version"
|
||||||
compile "info.picocli:picocli:$picocli_version"
|
compile "info.picocli:picocli:$picocli_version"
|
||||||
|
|
||||||
// TornadoFX: A lightweight Kotlin framework for working with JavaFX UI's.
|
// TornadoFX: A lightweight Kotlin framework for working with JavaFX UI's.
|
||||||
|
Loading…
Reference in New Issue
Block a user