scala / scala/scala-java8-compat

Documentation for Future.toJava is stricter than implemented functionality

Open
#63 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
438
Forks
63
Avg merge
5h 12m
Merged PRs (30d)
2

Description

It says here that the CompletionStage returned by FutureConverters doesn't support the toCompletableFuture() interface at all. However, it can be used fine to retrieve the value of a completed future, and/or wait for it. That functionality is currently used by e.g. akka.

The documentation could probably be extended to reflect that waiting / getting is fine, but completing is not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation at src/main/scala/scala/compat/java8/FutureConverters.scala#L23. Compare its statement about toCompletableFuture() with the reported behavior for retrieving or waiting on a completed future versus completing one. Done means the documentation accurately distinguishes the supported operations from the unsupported one.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.