scala / scala/scala-java8-compat

Wrong function conversion documentation

Open
#94 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I think the documentation regarding function conversion is wrong (at least the java code example) and doesn't compile.

To convert a java function to a scala function (like in baz) I have to write the following:

import static scala.compat.java8.JFunction.*;
...
// instead of return bar(functionConverters.asScalaFromFunction(f)) -> where should functionConverters come from?
return bar(func(f)); 
...

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 usage examples section linked in the issue and inspect the Java function-conversion example around functionConverters and JFunction. Verify the corrected example against the documented conversion API, then update the documentation so the Java snippet compiles and accurately shows the required import and call.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.