This is an automated email from the ASF dual-hosted git repository.

hepin pushed a commit to branch jfunction
in repository https://gitbox.apache.org/repos/asf/pekko.git

commit 12ca4d4e6206fa4359a74f1f9038574a22c1fa6c
Author: He-Pin <[email protected]>
AuthorDate: Sat Sep 13 12:55:34 2025 +0800

    chore: Make use of japi.funtion.* in Patterns
---
 .../src/main/scala/org/apache/pekko/pattern/Patterns.scala  | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala 
b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
index 2465aeccd8..b20e37cb9d 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
@@ -15,7 +15,6 @@ package org.apache.pekko.pattern
 
 import java.util.Optional
 import java.util.concurrent.{ Callable, CompletionStage, TimeUnit }
-import java.util.function.BiPredicate
 
 import scala.concurrent.ExecutionContext
 
@@ -518,7 +517,7 @@ object Patterns {
    */
   def retry[T](
       attempt: Callable[CompletionStage[T]],
-      shouldRetry: BiPredicate[T, Throwable],
+      shouldRetry: japi.function.Predicate2[T, Throwable],
       attempts: Int,
       ec: ExecutionContext): CompletionStage[T] = {
     require(attempt != null, "Parameter attempt should not be null.")
@@ -585,7 +584,7 @@ object Patterns {
    */
   def retry[T](
       attempt: Callable[CompletionStage[T]],
-      shouldRetry: BiPredicate[T, Throwable],
+      shouldRetry: japi.function.Predicate2[T, Throwable],
       attempts: Int,
       minBackoff: java.time.Duration,
       maxBackoff: java.time.Duration,
@@ -662,7 +661,7 @@ object Patterns {
    */
   def retry[T](
       attempt: Callable[CompletionStage[T]],
-      shouldRetry: BiPredicate[T, Throwable],
+      shouldRetry: japi.function.Predicate2[T, Throwable],
       attempts: Int,
       minBackoff: java.time.Duration,
       maxBackoff: java.time.Duration,
@@ -738,7 +737,7 @@ object Patterns {
    */
   def retry[T](
       attempt: Callable[CompletionStage[T]],
-      shouldRetry: BiPredicate[T, Throwable],
+      shouldRetry: japi.function.Predicate2[T, Throwable],
       attempts: Int,
       delay: java.time.Duration,
       system: ClassicActorSystemProvider): CompletionStage[T] =
@@ -787,7 +786,7 @@ object Patterns {
    */
   def retry[T](
       attempt: Callable[CompletionStage[T]],
-      shouldRetry: BiPredicate[T, Throwable],
+      shouldRetry: japi.function.Predicate2[T, Throwable],
       attempts: Int,
       delay: java.time.Duration,
       scheduler: Scheduler,
@@ -852,7 +851,7 @@ object Patterns {
    */
   def retry[T](
       attempt: Callable[CompletionStage[T]],
-      shouldRetry: BiPredicate[T, Throwable],
+      shouldRetry: japi.function.Predicate2[T, Throwable],
       attempts: Int,
       delayFunction: 
java.util.function.IntFunction[Optional[java.time.Duration]],
       scheduler: Scheduler,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to