CORDA-3738: Upgrade to DJVM 1.1-RC02. (#6195)

* CORDA-3738: Upgrade to DJVM 1.1-RC02.

* Update comment for DJVM 1.1's new requirements.
This commit is contained in:
Chris Rankin 2020-04-30 11:58:03 +01:00 committed by GitHub
parent 9bcb9b2f54
commit 83dd9a96da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

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

View File

@ -401,8 +401,7 @@ class ContractVerifier(private val transactionClassLoader: ClassLoader) : Functi
override fun apply(ltx: LedgerTransaction) {
val contractClassNames = (ltx.inputs.map(StateAndRef<ContractState>::state) + ltx.outputs)
.map(TransactionState<*>::contract)
.toSet()
.mapTo(LinkedHashSet(), TransactionState<*>::contract)
contractClassNames.associateBy(
{ it }, { createContractClass(ltx.id, it) }
@ -410,7 +409,7 @@ class ContractVerifier(private val transactionClassLoader: ClassLoader) : Functi
try {
/**
* This function must execute with the DJVM's sandbox, which does not
* permit user code to access [java.lang.reflect.Constructor] objects.
* permit user code to invoke [java.lang.Class.getDeclaredConstructor].
*
* [Class.newInstance] is deprecated as of Java 9.
*/

View File

@ -75,7 +75,7 @@ class NonDeterministicContractVerifyTest {
.returnValue.getOrThrow()
}
assertThat(ex)
.hasMessageMatching("^NoSuchMethodError: .*\\Qsandbox.java.lang.System.currentTimeMillis()\\E.*\$")
.hasMessageStartingWith("RuleViolationError: Disallowed reference to API; java.lang.System.currentTimeMillis(), ")
}
}
@ -88,7 +88,7 @@ class NonDeterministicContractVerifyTest {
.returnValue.getOrThrow()
}
assertThat(ex)
.hasMessageMatching("^NoSuchMethodError: .*\\Qsandbox.java.lang.System.nanoTime()\\E.*\$")
.hasMessageStartingWith("RuleViolationError: Disallowed reference to API; java.lang.System.nanoTime(), ")
}
}