Skip to content

AbstractStreamHandler.setDone() missing notifyAll() #404

Description

@elharo

AbstractStreamHandler.waitUntilDone() (line 33) is synchronized and calls wait() in a while (!isDone()) loop. But setDone() (line 47) only sets the done flag — it never calls notifyAll(). If a subclass calls setDone() without also calling notifyAll(), any thread blocked in waitUntilDone() waits forever.

StreamPumper works around this by calling notifyAll() in its own finally block (line 98), but the base class should be correct.

Fix: make setDone() synchronized and add this.notifyAll().

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions