CORDA-2871: Minor cosmetic fixes. (#69)

This commit is contained in:
Chris Rankin 2019-09-15 01:28:31 +01:00 committed by GitHub
parent 394d503d41
commit 8718433be6
3 changed files with 6 additions and 6 deletions

View File

@ -2,8 +2,8 @@ package net.corda.djvm.serialization.deserializers
import java.util.function.Function import java.util.function.Function
class DescribeEnum : Function<Class<*>, Array<out Any>> { class DescribeEnum : Function<Class<*>, Array<out Any?>> {
override fun apply(enumClass: Class<*>): Array<out Any> { override fun apply(enumClass: Class<*>): Array<out Any?> {
return enumClass.enumConstants return enumClass.enumConstants
} }
} }

View File

@ -17,7 +17,7 @@ class DeserializeEnumTest : TestBase(KOTLIN) {
@EnumSource(ExampleEnum::class) @EnumSource(ExampleEnum::class)
fun `test deserialize basic enum`(value: ExampleEnum) { fun `test deserialize basic enum`(value: ExampleEnum) {
val example = ExampleData(value) val example = ExampleData(value)
val data =example.serialize() val data = example.serialize()
sandbox { sandbox {
_contextSerializationEnv.set(createSandboxSerializationEnv(classLoader)) _contextSerializationEnv.set(createSandboxSerializationEnv(classLoader))

View File

@ -41,7 +41,7 @@ abstract class TestBase(type: SandboxType) {
private lateinit var bootstrapClassLoader: BootstrapClassLoader private lateinit var bootstrapClassLoader: BootstrapClassLoader
private lateinit var configuration: SandboxConfiguration private lateinit var configuration: SandboxConfiguration
private lateinit var classLoader: SandboxClassLoader private lateinit var parentClassLoader: SandboxClassLoader
@BeforeAll @BeforeAll
@JvmStatic @JvmStatic
@ -65,7 +65,7 @@ abstract class TestBase(type: SandboxType) {
true, true,
rootConfiguration rootConfiguration
) )
classLoader = SandboxClassLoader.createFor(configuration) parentClassLoader = SandboxClassLoader.createFor(configuration)
} }
@AfterAll @AfterAll
@ -110,7 +110,7 @@ abstract class TestBase(type: SandboxType) {
configuration.definitionProviders, configuration.definitionProviders,
enableTracing, enableTracing,
analysisConfiguration, analysisConfiguration,
classLoader parentClassLoader
)).use { )).use {
action(this) action(this)
} }