From d28d2fbc70189bb1929e802dfb037b2df4a9d12a Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 11 Aug 2020 00:01:32 +0200 Subject: [PATCH] Removed dead code --- src/dorkbox/executor/Executor.kt | 4 +- .../processResults/AsyncProcessResult.kt | 53 ------------------- 2 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 src/dorkbox/executor/processResults/AsyncProcessResult.kt diff --git a/src/dorkbox/executor/Executor.kt b/src/dorkbox/executor/Executor.kt index f0182e7..e9e0a8e 100644 --- a/src/dorkbox/executor/Executor.kt +++ b/src/dorkbox/executor/Executor.kt @@ -23,7 +23,6 @@ package dorkbox.executor import dorkbox.executor.exceptions.InvalidExitValueException import dorkbox.executor.exceptions.ProcessInitException import dorkbox.executor.listener.* -import dorkbox.executor.processResults.AsyncProcessResult import dorkbox.executor.processResults.NopProcessResult import dorkbox.executor.processResults.ProcessResult import dorkbox.executor.processResults.SyncProcessResult @@ -214,7 +213,7 @@ open class Executor { private var closeTimeoutUnit: TimeUnit = TimeUnit.SECONDS /** - * `true` if the process output should be read to a buffer and returned by [SyncProcessResult] or [AsyncProcessResult] + * `true` if the process output should be read to a buffer and returned by [SyncProcessResult] or [DeferredProcessResult] */ private var readOutput = false @@ -1487,4 +1486,3 @@ open class Executor { return deferred } } - diff --git a/src/dorkbox/executor/processResults/AsyncProcessResult.kt b/src/dorkbox/executor/processResults/AsyncProcessResult.kt deleted file mode 100644 index 4459de3..0000000 --- a/src/dorkbox/executor/processResults/AsyncProcessResult.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2020 dorkbox, llc - * Copyright (C) 2014 ZeroTurnaround - * Contains fragments of code from Apache Commons Exec, rights owned - * by Apache Software Foundation (ASF). - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dorkbox.executor.processResults - -import kotlinx.coroutines.channels.Channel - -/** - * Exit value of a finished process. - * - * @param exitValue Exit value of the finished process. - */ -class AsyncProcessResult(private val exitValue: Int, private val channel: Channel) : - ProcessResult { - /** - * @return the exit value of the finished process. - */ - override fun getExitValue(): Int { - return exitValue - } - - /** - * @return true if this result has output - */ - override val hasOutput: Boolean = true - - /** - * @return output of the finished process. - * - * You must invoke [ProcessExecutor.readOutput] to allow the process output to be read. - * - * @throws IllegalStateException if reading the output was not enabled. - */ - val output: AsyncProcessOutput by lazy { - AsyncProcessOutput(channel) - } -}