CORDA-2876: Upgrade DJVM to 1.0-RC03.

This commit is contained in:
Chris Rankin 2019-11-16 16:50:42 +00:00
parent a201a8d52b
commit c68f8161fc
3 changed files with 7 additions and 6 deletions

View File

@ -29,7 +29,7 @@ snakeYamlVersion=1.19
caffeineVersion=2.7.0 caffeineVersion=2.7.0
metricsVersion=4.1.0 metricsVersion=4.1.0
metricsNewRelicVersion=1.1.1 metricsNewRelicVersion=1.1.1
djvmVersion=1.0-RC02 djvmVersion=1.0-RC03
openSourceBranch=https://github.com/corda/corda/blob/release/os/4.4 openSourceBranch=https://github.com/corda/corda/blob/release/os/4.4
openSourceSamplesBranch=https://github.com/corda/samples/blob/release-V4 openSourceSamplesBranch=https://github.com/corda/samples/blob/release-V4
jolokiaAgentVersion=1.6.1 jolokiaAgentVersion=1.6.1

View File

@ -19,6 +19,7 @@ import net.corda.djvm.messages.Message
import net.corda.djvm.rewiring.SandboxClassLoader import net.corda.djvm.rewiring.SandboxClassLoader
import net.corda.djvm.source.ClassSource import net.corda.djvm.source.ClassSource
import net.corda.node.djvm.LtxFactory import net.corda.node.djvm.LtxFactory
import java.util.function.Function
class DeterministicVerifier( class DeterministicVerifier(
ltx: LedgerTransaction, ltx: LedgerTransaction,
@ -27,7 +28,7 @@ class DeterministicVerifier(
) : Verifier(ltx, transactionClassLoader) { ) : Verifier(ltx, transactionClassLoader) {
override fun verifyContracts() { override fun verifyContracts() {
val result = IsolatedTask(ltx.id.toString(), sandboxConfiguration).run { val result = IsolatedTask(ltx.id.toString(), sandboxConfiguration).run<Any>(Function { classLoader ->
(classLoader.parent as? SandboxClassLoader)?.apply { (classLoader.parent as? SandboxClassLoader)?.apply {
/** /**
* We don't need to add either Java APIs or Corda's own classes * We don't need to add either Java APIs or Corda's own classes
@ -92,7 +93,7 @@ class DeterministicVerifier(
// Now execute the contract verifier task within the sandbox... // Now execute the contract verifier task within the sandbox...
verifier.apply(sandboxTx) verifier.apply(sandboxTx)
} })
with (result.costs) { with (result.costs) {
logger.info("Verify {} complete: allocations={}, invocations={}, jumps={}, throws={}", logger.info("Verify {} complete: allocations={}, invocations={}, jumps={}, throws={}",

View File

@ -102,9 +102,9 @@ abstract class TestBase(type: SandboxType) {
it.setMinimumSeverityLevel(minimumSeverityLevel) it.setMinimumSeverityLevel(minimumSeverityLevel)
it.setSandboxOnlyAnnotations(sandboxOnlyAnnotations) it.setSandboxOnlyAnnotations(sandboxOnlyAnnotations)
it.setVisibleAnnotations(visibleAnnotations) it.setVisibleAnnotations(visibleAnnotations)
})).use { })).use(Consumer { ctx ->
action(this) ctx.action()
} })
} }
}.apply { }.apply {
uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { _, ex -> uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { _, ex ->