Skip to content

Commit ae04328

Browse files
committed
Merge pull request #22214 from XenoAmess
* gh-22214: Polish "Fix unwrapping of captured PrintStream in test support's OutputCapture" Fix unwrapping of captured PrintStream in test support's OutputCapture Closes gh-22214
2 parents 4301580 + a0f1424 commit ae04328

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -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)