refactor(connector): made VDMJ into an object

This commit is contained in:
Anthony Berg 2024-05-09 09:00:32 +01:00
parent 85ca7b11f4
commit 098124bc8c
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ import java.nio.file.Paths
import kotlin.io.path.pathString import kotlin.io.path.pathString
@OptIn(DelicateCoroutinesApi::class) @OptIn(DelicateCoroutinesApi::class)
class VDMJ { object VDMJ {
// Create a ByteArrayOutputStream to capture the output // Create a ByteArrayOutputStream to capture the output
private val byteArrayOutputStream = ByteArrayOutputStream() private val byteArrayOutputStream = ByteArrayOutputStream()
private val printStream = ConsolePrintWriter(byteArrayOutputStream) private val printStream = ConsolePrintWriter(byteArrayOutputStream)

View File

@ -10,7 +10,7 @@ import io.ktor.utils.io.errors.*
* and run steps * and run steps
*/ */
class VDMJTransaction(val actions: List<Action>, private val xpc: XPC) { class VDMJTransaction(val actions: List<Action>, private val xpc: XPC) {
private val vdmj = VDMJ() private val vdmj = VDMJ
private val drefs: Array<String> = actions.map { it.type }.toTypedArray() private val drefs: Array<String> = actions.map { it.type }.toTypedArray()