diff --git a/node/capsule/src/main/resources/compile-commands.txt b/node/capsule/src/main/resources/compile-commands.txt new file mode 100644 index 0000000000..355bb6110b --- /dev/null +++ b/node/capsule/src/main/resources/compile-commands.txt @@ -0,0 +1,2 @@ +quiet +exclude sandbox/*.* diff --git a/node/djvm/src/main/kotlin/net/corda/node/djvm/AttachmentBuilder.kt b/node/djvm/src/main/kotlin/net/corda/node/djvm/AttachmentBuilder.kt index e91d50a759..956180349c 100644 --- a/node/djvm/src/main/kotlin/net/corda/node/djvm/AttachmentBuilder.kt +++ b/node/djvm/src/main/kotlin/net/corda/node/djvm/AttachmentBuilder.kt @@ -12,7 +12,7 @@ class AttachmentBuilder : Function?, List?> { private val attachments = mutableListOf() private fun unmodifiable(list: List): List { - return if(list.isEmpty()) { + return if (list.isEmpty()) { emptyList() } else { unmodifiableList(list) @@ -25,11 +25,11 @@ class AttachmentBuilder : Function?, List?> { } else { @Suppress("unchecked_cast") attachments.add(SandboxAttachment( - signerKeys = inputs[0] as List, - size = inputs[1] as Int, - id = inputs[2] as SecureHash, - attachment = inputs[3], - streamer = inputs[4] as Function + signerKeys = inputs[0] as List, + size = inputs[1] as Int, + id = inputs[2] as SecureHash, + attachment = inputs[3], + streamer = inputs[4] as Function )) null } diff --git a/node/djvm/src/main/kotlin/net/corda/node/djvm/ComponentBuilder.kt b/node/djvm/src/main/kotlin/net/corda/node/djvm/ComponentBuilder.kt index d5c73b15ea..919d50f989 100644 --- a/node/djvm/src/main/kotlin/net/corda/node/djvm/ComponentBuilder.kt +++ b/node/djvm/src/main/kotlin/net/corda/node/djvm/ComponentBuilder.kt @@ -11,7 +11,7 @@ class ComponentBuilder : Function, List<*>> { override fun apply(inputs: Array): List<*> { val deserializer = inputs[0] as Function val groupType = inputs[1] as ComponentGroupEnum - val components = (inputs[2] as Array).map { OpaqueBytes(it) } + val components = (inputs[2] as Array).map(::OpaqueBytes) return components.lazyMapped { component, index -> try {