Removed dead code

This commit is contained in:
nathan 2020-08-11 00:01:32 +02:00
parent 9aa8c1041b
commit d28d2fbc70
2 changed files with 1 additions and 56 deletions

View File

@ -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
}
}

View File

@ -1,53 +0,0 @@
/*
* Copyright 2020 dorkbox, llc
* Copyright (C) 2014 ZeroTurnaround <support@zeroturnaround.com>
* 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<Byte>) :
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)
}
}