This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 5abffda7db modify out of date note about java8 compat (#361)
5abffda7db is described below
commit 5abffda7db09ecfcaf68fdf93414b72e7cb8e384
Author: PJ Fanning <[email protected]>
AuthorDate: Mon May 29 17:42:35 2023 +0100
modify out of date note about java8 compat (#361)
* remove out of date note about java8 compat
* Update CONTRIBUTING.md
* extend notes for Java API contributors
* vice versa
---
CONTRIBUTING.md | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cc773b6382..6ea7eb0c2d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -533,10 +533,12 @@ Scala has proven the most viable way to do it, as long as
you keep the following
1. If the underlying Scala code requires an `ExecutionContext`, make the Java
API take an `Executor` and use
`ExecutionContext.fromExecutor(executor)` for conversion.
-1. Make use of `scala-java8-compat` conversions, see
[GitHub](https://github.com/scala/scala-java8-compat)
- (eg. `scala.compat.java8.FutureConverters` to translate Futures to
`CompletionStage`s).
- Note that we cannot upgrade to a newer version scala-java8-compat because
of binary compatibility issues.
+1. Use `org.apache.pekko.util.FutureConverters` to translate `Future`s to
`CompletionStage`s (or vice versa).
+1. Use `org.apache.pekko.util.OptionConverters` to translate `Option`s to Java
`Optional`s (or vice versa).
+
+1. Use `org.apache.pekko.util.FunctionConverters` to translate Scala Functions
to Java Functions (or vice versa).
+
1. Make sure there are Java tests or sample code touching all parts of the API
1. Do not use lower type bounds: `trait[T] { def method[U >: Something]: U }`
as they do not work with Java
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]