Skip to content

Commit 75a64bd

Browse files
XenoAmesswilkinsona
authored andcommitted
Fix unwrapping of captured PrintStream in test support's OutputCapture
See gh-22214
1 parent 4301580 commit 75a64bd

File tree

1 file changed

+1
-1
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/system

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/system/OutputCapture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ PrintStream getParent() {
194194

195195
private static PrintStream getSystemStream(PrintStream printStream) {
196196
while (printStream instanceof PrintStreamCapture) {
197-
return ((PrintStreamCapture) printStream).getParent();
197+
printStream = ((PrintStreamCapture) printStream).getParent();
198198
}
199199
return printStream;
200200
}

0 commit comments

Comments
 (0)