From 8718433be6862b3927f983180c3988a7f2b8c4d1 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Sun, 15 Sep 2019 01:28:31 +0100 Subject: [PATCH] CORDA-2871: Minor cosmetic fixes. (#69) --- .../corda/djvm/serialization/deserializers/DescribeEnum.kt | 4 ++-- .../net/corda/djvm/serialization/DeserializeEnumTest.kt | 2 +- src/test/kotlin/net/corda/djvm/serialization/TestBase.kt | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deserializers/src/main/kotlin/net/corda/djvm/serialization/deserializers/DescribeEnum.kt b/deserializers/src/main/kotlin/net/corda/djvm/serialization/deserializers/DescribeEnum.kt index 1d8d7e371e..6db4c223af 100644 --- a/deserializers/src/main/kotlin/net/corda/djvm/serialization/deserializers/DescribeEnum.kt +++ b/deserializers/src/main/kotlin/net/corda/djvm/serialization/deserializers/DescribeEnum.kt @@ -2,8 +2,8 @@ package net.corda.djvm.serialization.deserializers import java.util.function.Function -class DescribeEnum : Function, Array> { - override fun apply(enumClass: Class<*>): Array { +class DescribeEnum : Function, Array> { + override fun apply(enumClass: Class<*>): Array { return enumClass.enumConstants } } diff --git a/src/test/kotlin/net/corda/djvm/serialization/DeserializeEnumTest.kt b/src/test/kotlin/net/corda/djvm/serialization/DeserializeEnumTest.kt index 4d4784a5c2..417d76446e 100644 --- a/src/test/kotlin/net/corda/djvm/serialization/DeserializeEnumTest.kt +++ b/src/test/kotlin/net/corda/djvm/serialization/DeserializeEnumTest.kt @@ -17,7 +17,7 @@ class DeserializeEnumTest : TestBase(KOTLIN) { @EnumSource(ExampleEnum::class) fun `test deserialize basic enum`(value: ExampleEnum) { val example = ExampleData(value) - val data =example.serialize() + val data = example.serialize() sandbox { _contextSerializationEnv.set(createSandboxSerializationEnv(classLoader)) diff --git a/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt b/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt index ade9a41fa0..8495c8a209 100644 --- a/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt +++ b/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt @@ -41,7 +41,7 @@ abstract class TestBase(type: SandboxType) { private lateinit var bootstrapClassLoader: BootstrapClassLoader private lateinit var configuration: SandboxConfiguration - private lateinit var classLoader: SandboxClassLoader + private lateinit var parentClassLoader: SandboxClassLoader @BeforeAll @JvmStatic @@ -65,7 +65,7 @@ abstract class TestBase(type: SandboxType) { true, rootConfiguration ) - classLoader = SandboxClassLoader.createFor(configuration) + parentClassLoader = SandboxClassLoader.createFor(configuration) } @AfterAll @@ -110,7 +110,7 @@ abstract class TestBase(type: SandboxType) { configuration.definitionProviders, enableTracing, analysisConfiguration, - classLoader + parentClassLoader )).use { action(this) }