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

He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new 8a3774add3 refactor: remove deprecated 
RepointableActorRef.isTerminated (since Akka 2.2) (#3289)
8a3774add3 is described below

commit 8a3774add3c0953b1699771b8ba7cc31fa5794eb
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sun Jul 5 16:37:15 2026 +0800

    refactor: remove deprecated RepointableActorRef.isTerminated (since Akka 
2.2) (#3289)
    
    Motivation:
    The public isTerminated method on RepointableActorRef was deprecated since
    Akka 2.2 in favor of using context.watch(actor) and receiving 
Terminated(actor).
    
    Modification:
    Remove the deprecated public isTerminated method. The private[pekko] version
    from the ActorRef trait remains available for internal use.
    
    Result:
    Cleaner public API. Internal callers are unaffected as they use the
    private[pekko] ActorRef.isTerminated.
    
    Tests:
    Not run - trivial removal of long-deprecated method
    
    References:
    None - deprecated API cleanup
---
 .../src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala  | 5 ++---
 actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala   | 2 +-
 actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala  | 2 --
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala 
b/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala
index 0e9e562d81..5767188b8f 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala
@@ -151,15 +151,14 @@ private[pekko] class RepointableActorRef(
 
   def restart(cause: Throwable): Unit = underlying.restart(cause)
 
+  override private[pekko] def isTerminated: Boolean = underlying.isTerminated
+
   def isStarted: Boolean = underlying match {
     case _: UnstartedCell => false
     case null             => throw new IllegalStateException("isStarted called 
before initialized")
     case _                => true
   }
 
-  @deprecated("Use context.watch(actor) and receive Terminated(actor)", "Akka 
2.2") def isTerminated: Boolean =
-    underlying.isTerminated
-
   def provider: ActorRefProvider = system.provider
 
   def isLocal: Boolean = underlying.isLocal
diff --git a/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala 
b/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala
index ba7964213a..9a95bd2b59 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala
@@ -34,7 +34,7 @@ import pekko.dispatch.MessageDispatcher
  * A RoutedActorRef is an ActorRef that has a set of connected ActorRef and it 
uses a Router to
  * send a message to one (or more) of these actors.
  */
-@nowarn("msg=deprecated")
+@nowarn("msg=BalancingDispatcher.*deprecated")
 private[pekko] class RoutedActorRef(
     _system: ActorSystemImpl,
     _routerProps: Props,
diff --git 
a/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala 
b/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala
index 60f50940e1..13b9abb7ea 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala
@@ -92,8 +92,6 @@ class SmallestMailboxRoutingLogic extends RoutingLogic {
     }
   }
 
-  // TODO should we rewrite this not to use isTerminated?
-  @nowarn("msg=deprecated")
   protected def isTerminated(a: Routee): Boolean = a match {
     case ActorRefRoutee(ref) => ref.isTerminated
     case _                   => false


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

Reply via email to