-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve issues with SpringAnalyzerProcess
- Loading branch information
1 parent
8ffdeb4
commit 0a85c54
Showing
17 changed files
with
118 additions
and
109 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
utbot-core/src/main/kotlin/org/utbot/common/StandardStreamUtil.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
utbot-rd/src/main/kotlin/org/utbot/rd/StandardStreamUtil.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.utbot.rd | ||
|
||
import org.utbot.common.silent | ||
import java.io.OutputStream | ||
import java.io.PrintStream | ||
|
||
object StandardStreamUtil { | ||
fun silentlyCloseStandardStreams() { | ||
// we should change out/err streams as not to spend time on user output | ||
// and also because rd default logging system writes some initial values to stdout, polluting it as well | ||
val tmpStream = PrintStream(object : OutputStream() { | ||
override fun write(b: Int) {} | ||
}) | ||
val prevOut = System.out | ||
val prevError = System.err | ||
System.setOut(tmpStream) | ||
System.setErr(tmpStream) | ||
// stdin/stderr should be closed as not to leave hanging descriptors | ||
// and we cannot log any exceptions here as rd remote logging is still not configured | ||
// so we pass any exceptions | ||
silent { prevOut.close() } | ||
silent { prevError.close() } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.