mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8310530: PipedOutputStream.flush() accesses sink racily
Reviewed-by: dfuchs, bpb, liach, rriggs
This commit is contained in:
parent
fac9f88c52
commit
d8f2e9ae3b
1 changed files with 1 additions and 0 deletions
|
@ -163,6 +163,7 @@ public class PipedOutputStream extends OutputStream {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public synchronized void flush() throws IOException {
|
public synchronized void flush() throws IOException {
|
||||||
|
var sink = this.sink;
|
||||||
if (sink != null) {
|
if (sink != null) {
|
||||||
synchronized (sink) {
|
synchronized (sink) {
|
||||||
sink.notifyAll();
|
sink.notifyAll();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue