Skip to content

Commit 57d1bf9

Browse files
committed
revert workaround change for scala/scala3#8425 (fixed)
1 parent 5617228 commit 57d1bf9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

akka-testkit/src/test/scala/akka/testkit/WithLogCapturing.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@ trait WithLogCapturing extends SuiteMixin { this: TestSuite =>
5050
/** Adds a prefix to every line printed out during execution of the thunk. */
5151
private def withPrefixedOut[T](prefix: String)(thunk: => T): T = {
5252
val oldOut = Console.out
53-
// https://github.com/lampepfl/dotty/issues/8425
54-
val os = new OutputStream {
55-
override def write(b: Int): Unit = oldOut.write(b)
56-
}
5753
val prefixingOut =
58-
new PrintStream(os) {
54+
new PrintStream(new OutputStream {
55+
override def write(b: Int): Unit = oldOut.write(b)
56+
}) {
5957
override def println(x: Any): Unit =
6058
oldOut.println(prefix + String.valueOf(x).replaceAllLiterally("\n", s"\n$prefix"))
6159
}

0 commit comments

Comments
 (0)