mirror of
https://github.com/corda/corda.git
synced 2025-02-05 02:29:20 +00:00
Small whitespace and code-style refactors.
This commit is contained in:
parent
cde4db7279
commit
eeae38a16c
2
node/capsule/src/main/resources/compile-commands.txt
Normal file
2
node/capsule/src/main/resources/compile-commands.txt
Normal file
@ -0,0 +1,2 @@
|
||||
quiet
|
||||
exclude sandbox/*.*
|
@ -12,7 +12,7 @@ class AttachmentBuilder : Function<Array<Any>?, List<Attachment>?> {
|
||||
private val attachments = mutableListOf<Attachment>()
|
||||
|
||||
private fun <T> unmodifiable(list: List<T>): List<T> {
|
||||
return if(list.isEmpty()) {
|
||||
return if (list.isEmpty()) {
|
||||
emptyList()
|
||||
} else {
|
||||
unmodifiableList(list)
|
||||
@ -25,11 +25,11 @@ class AttachmentBuilder : Function<Array<Any>?, List<Attachment>?> {
|
||||
} else {
|
||||
@Suppress("unchecked_cast")
|
||||
attachments.add(SandboxAttachment(
|
||||
signerKeys = inputs[0] as List<PublicKey>,
|
||||
size = inputs[1] as Int,
|
||||
id = inputs[2] as SecureHash,
|
||||
attachment = inputs[3],
|
||||
streamer = inputs[4] as Function<in Any, out InputStream>
|
||||
signerKeys = inputs[0] as List<PublicKey>,
|
||||
size = inputs[1] as Int,
|
||||
id = inputs[2] as SecureHash,
|
||||
attachment = inputs[3],
|
||||
streamer = inputs[4] as Function<in Any, out InputStream>
|
||||
))
|
||||
null
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ class ComponentBuilder : Function<Array<Any?>, List<*>> {
|
||||
override fun apply(inputs: Array<Any?>): List<*> {
|
||||
val deserializer = inputs[0] as Function<in Any?, out Any?>
|
||||
val groupType = inputs[1] as ComponentGroupEnum
|
||||
val components = (inputs[2] as Array<ByteArray>).map { OpaqueBytes(it) }
|
||||
val components = (inputs[2] as Array<ByteArray>).map(::OpaqueBytes)
|
||||
|
||||
return components.lazyMapped { component, index ->
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user