Skip to content

False FutureTask Usage #2

@mezmor

Description

@mezmor

In IncomingFileTransfer.java there is a use of FutureTask on lines 182-193 that is executed incorrectly.

Executing a FutureTask in this style does not run the FutureTask asynchronously. To run a FutureTask asynchronously a Thread must be created or the task must be executed via an ExecutorService.

A simple fix would be to replace
190: streamNegotiatorTask.run();
with
190: new Thread(streamNegotiatorTask).start();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions