diff --git a/src/main/kotlin/terminal/TerminalConfiguration.kt b/src/main/kotlin/terminal/TerminalConfiguration.kt index b43a22e..d3b88a3 100644 --- a/src/main/kotlin/terminal/TerminalConfiguration.kt +++ b/src/main/kotlin/terminal/TerminalConfiguration.kt @@ -9,15 +9,11 @@ import java.io.PipedOutputStream class TerminalConfiguration { - var inputWriter: PipedOutputStream? = null - private set + lateinit var inputWriter: PipedOutputStream lateinit var inputReader: PipedInputStream - private set - var outputWriter: PipedOutputStream? = null - private set - var outputReader: PipedInputStream? = null - private set - var terminal: IOSafeTerminal? = null + lateinit var outputWriter: PipedOutputStream + lateinit var outputReader: PipedInputStream + lateinit var terminal: IOSafeTerminal fun setInputPair(inputWriter: PipedOutputStream, inputReader: PipedInputStream) { this.inputWriter = inputWriter @@ -27,7 +23,7 @@ class TerminalConfiguration { private fun connectInputPair() { try { - inputWriter!!.connect(inputReader!!) + inputWriter.connect(inputReader) } catch (e: IOException) { throw LispIOException(e) } @@ -41,7 +37,7 @@ class TerminalConfiguration { private fun connectOutputPair() { try { - outputWriter!!.connect(outputReader!!) + outputWriter.connect(outputReader) } catch (e: IOException) { throw LispIOException(e) }