Skip to content
Snippets Groups Projects
Commit ab37ec4d authored by SeeBasTStick's avatar SeeBasTStick
Browse files

cleaning up unused code

parent d79ccdd9
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,7 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
"PERFORMANCE_INFO"
//voiding stdout and stderr
val outputSink = if(System.getProperty("os.name").toLowerCase().contains("win")){
File("NUL")
}else{
......@@ -156,16 +157,6 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
val process: Process = command.start()
//just void error and output
communicator.sendDebugMessage("clearing input stream", MessageType.Info)
readAndVoid(process.inputStream)
communicator.sendDebugMessage("clearing error stream", MessageType.Info)
readAndVoid(process.errorStream)
communicator.sendDebugMessage("waiting for process to return", MessageType.Info)
// process.waitFor() //we must wait here to ensure correct behavior when reading an error
......@@ -174,46 +165,6 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
}
private fun readAndVoid(stream: InputStream) {
stream.readAllBytes()
}
private fun readFromStream(stream: InputStream) : String{
return ""
// stream.readAllBytes()
/* val reader = BufferedReader(InputStreamReader(stream))
val builder = StringBuilder()
var line: String?
var currentLine = reader.readLine()
while (currentLine != null){
communicator.sendDebugMessage("current line $currentLine", MessageType.Info)
communicator.sendDebugMessage("reading next line ", MessageType.Info)
currentLine = reader.readLine()
communicator.sendDebugMessage("checking line", MessageType.Info)
}
*/
/*
while (reader.readLine().also { line = it } != null) {
communicator.sendDebugMessage("read line", MessageType.Info)
builder.append(line)
builder.append(System.getProperty("line.separator"))
communicator.sendDebugMessage("Line Contains, $line and ${line!!.length} symboles", MessageType.Info)
}
communicator.sendDebugMessage("returning", MessageType.Info)
*/
// return builder.toString()
}
/**
* Reads the errors and transforms them to java objects
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment